Checking for freetype2 error when installing php5.6 on arch linux - archlinux

I'm trying to install PHP version 5.6.37 from AUR using makepkg -i command, but when it reaches the moment to check for the "freetype2" it displays the error:
checking for freetype2... configure: error: freetype-config not found.
I already have 7.2 installed, but I need the 5.6 for an older project, and as in Ubuntu, I intend to have both installed.
makepkg -i
==> Making package: php56 5.6.37-1 (Wed 12 Sep 2018 12:27:39 PM +08)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
-> Found php-5.6.37.tar.xz
-> Found php-5.6.37.tar.xz.asc
-> Found php.ini.patch
-> Found apache.conf
-> Found php-fpm.conf.in.patch
-> Found logrotate.d.php-fpm
-> Found php-fpm.service
-> Found php-fpm.tmpfiles
-> Found use-enchant2.patch
-> Found php-freetype-2.9.1.patch
==> Validating source files with sha512sums...
[...]
checking whether to enable truetype string function in GD... yes
checking whether to enable JIS-mapped Japanese font support in GD... no
If configure fails try --with-vpx-dir=<DIR>
checking for jpeg_read_header in -ljpeg... yes
checking for png_write_image in -lpng... yes
checking for XpmFreeXpmImage in -lXpm... yes
checking for pkg-config... (cached) no
checking for freetype2... configure: error: freetype-config not found.
==> ERROR: A failure occurred in build().
Aborting...
Installing freetype2 with Pacman didn't solve it.

ln -s /usr/bin/pkg-config /usr/bin/freetype-config
and in PKGBUILD
--with-freetype-dir=no \

Related

configure: error: cannot run C compiled programs while installing HPCToolkit with Spack

I was tring installing HPCToolkit following this tutorial:
http://hpctoolkit.org/software-instructions.html#Prerequisites
and, after entering "Spack install hpctoolkit" I got some error messages
2 errors found in build log:
10 checking whether make supports nested variables... yes
11 checking whether make sets $(MAKE)... (cached) yes
12 checking for x86_64-conda-linux-gnu-gcc... /home/ncaa/spack/lib/spack/env/gcc/gcc
13 checking whether the C compiler works... yes
14 checking for C compiler default output file name... a.out
15 checking for suffix of executables...
>> 16 checking whether we are cross compiling... configure: error: in `/tmp/ncaa/spack-stage/spack-stage-libiconv-1.16-e7emipnlb4kfxggwdzwb7fgpbu5hpupy/spack-src':
>> 17 configure: error: cannot run C compiled programs.
18 If you meant to cross compile, use `--host'.
19 See `config.log' for more details
See build log for details:
/tmp/ncaa/spack-stage/spack-stage-libiconv-1.16-e7emipnlb4kfxggwdzwb7fgpbu5hpupy/spack-build-out.txt
spack-build-out.txt:
==> libiconv: Executing phase: 'autoreconf'
==> libiconv: Executing phase: 'configure'
==> [2021-03-13-20:45:16.501013] Copying ./build-aux/config.guess to libcharset/build-aux/config.guess
==> [2021-03-13-20:45:16.510159] '/tmp/ncaa/spack-stage/spack-stage-libiconv-1.16-e7emipnlb4kfxggwdzwb7fgpbu5hpupy/spack-src/configure' '--prefix=/home/ncaa/spack/opt/spack/linux-centos7-x86_64/gcc-8.4.0/libiconv-1.16-e7emipnlb4kfxggwdzwb7fgpbu5hpupy' '--enable-extra-encodings'
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether make sets $(MAKE)... (cached) yes
checking for x86_64-conda-linux-gnu-gcc... /home/ncaa/spack/lib/spack/env/gcc/gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... configure: error: in `/tmp/ncaa/spack-stage/spack-stage-libiconv-1.16-e7emipnlb4kfxggwdzwb7fgpbu5hpupy/spack-src':
configure: error: cannot run C compiled programs.
If you meant to cross compile, use `--host'.
See `config.log' for more details
config.log (on OneDrive):https://1drv.ms/u/s!Ah8JdDB38REth3K7XSgq6TZQ46eV?e=4z2bQI
my platform and user environment
(env0) [ncaa#localhost ~]$ uname -a
Linux localhost.localdomain 3.10.0-229.el7.x86_64 #1 SMP Fri Mar 6 11:36:42 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
(env0) [ncaa#localhost ~]$ cat /etc/redhat-release
CentOS Linux release 7.1.1503 (Core)
(env0) [ncaa#localhost ~]$ gcc --version
gcc (crosstool-NG 1.24.0.133_b0863d8_dirty) 8.4.0
Copyright (C) 2018 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
(env0) [ncaa#localhost ~]$ rpm -qa | grep glibc
glibc-2.17-157.el7_3.2.i686
compat-glibc-headers-2.12-4.el7.centos.x86_64
glibc-common-2.17-157.el7_3.2.x86_64
glibc-devel-2.17-157.el7_3.2.i686
compat-glibc-2.12-4.el7.centos.x86_64
glibc-2.17-157.el7_3.2.x86_64
glibc-devel-2.17-157.el7_3.2.x86_64
glibc-headers-2.17-157.el7_3.2.x86_64
(env0) [ncaa#localhost ~]$ spack config get compilers
compilers:
- compiler:
spec: gcc#8.4.0
paths:
cc: /home/ncaa/anaconda3/envs/env0/bin/gcc
cxx: /home/ncaa/anaconda3/envs/env0/bin/g++
f77:
fc:
flags: {}
operating_system: centos7
target: x86_64
modules: []
environment: {}
extra_rpaths: []
config.yaml (on OneDrive):https://1drv.ms/u/s!Ah8JdDB38REth3P-jV-PP9P-bSjS?e=6ucN9e
packages.yaml (on OneDrive):https://1drv.ms/u/s!Ah8JdDB38REth3RTTTJGckufGQVT?e=fFs2YH
running "spack install xz" gives:
(env0) [ncaa#localhost ~]$ spack install xz
==> Installing xz-5.2.5-ilny777kxpjghq6abvl7hv5skt5sxo3k
==> No binary for xz-5.2.5-ilny777kxpjghq6abvl7hv5skt5sxo3k found: installing from source
==> Using cached archive: /home/ncaa/spack/var/spack/cache/_source-cache/archive/51/5117f930900b341493827d63aa910ff5e011e0b994197c3b71c08a20228a42df.tar.bz2
==> No patches needed for xz
==> xz: Executing phase: 'autoreconf'
==> xz: Executing phase: 'configure'
==> Error: ProcessError: Command exited with status 1:
'/tmp/ncaa/spack-stage/spack-stage-xz-5.2.5-ilny777kxpjghq6abvl7hv5skt5sxo3k/spack-src/configure' '--prefix=/home/ncaa/spack/opt/spack/linux-centos7-x86_64/gcc-8.4.0/xz-5.2.5-ilny777kxpjghq6abvl7hv5skt5sxo3k'
2 errors found in build log:
34 checking whether ln -s works... yes
35 checking whether make supports the include directive... yes (GNU style)
36 checking for x86_64-conda-linux-gnu-gcc... /home/ncaa/spack/lib/spack/env/gcc/gcc
37 checking whether the C compiler works... yes
38 checking for C compiler default output file name... a.out
39 checking for suffix of executables...
>> 40 checking whether we are cross compiling... configure: error: in `/tmp/ncaa/spack-stage/spack-stage-xz-5.2.5-ilny777kxpjghq6abvl7hv5skt5sxo3k/spack-src':
>> 41 configure: error: cannot run C compiled programs.
42 If you meant to cross compile, use `--host'.
43 See `config.log' for more details
See build log for details:
/tmp/ncaa/spack-stage/spack-stage-xz-5.2.5-ilny777kxpjghq6abvl7hv5skt5sxo3k/spack-build-out.txt
It seems the problem has something to do with cross compiling check
switching gcc version to 7.3.0 fixed this problem. The cross compiling check get result "no" now.

FASTCGI Install on Raspberry PI Error - Cannot Manually Build Package

I have searched the internet all weekend and cannot find anyone who has had a similar error. I am trying to install libapache-mod-factcgi but the package errors out and I cannot figure out why.
pi#applejacks:/tmp $ sudo apt-get source -b libapache2-mod-fastcgi
Reading package lists... Done
Building dependency tree
Reading state information... Done
Skipping already downloaded file 'libapache-mod-fastcgi_2.4.7~0910052141-1.1+deb8u1.dsc'
Skipping already downloaded file 'libapache-mod-fastcgi_2.4.7~0910052141.orig.tar.gz'
Skipping already downloaded file 'libapache-mod-fastcgi_2.4.7~0910052141-1.1+deb8u1.diff.gz'
Need to get 0 B of source archives.
Skipping unpack of already unpacked source in libapache-mod-fastcgi-2.4.7~0910052141
dpkg-buildpackage: source package libapache-mod-fastcgi
dpkg-buildpackage: source version 2.4.7~0910052141-1.1+deb8u1
dpkg-buildpackage: source distribution jessie
dpkg-buildpackage: source changed by Andreas Beckmann <anbe#debian.org>
dpkg-buildpackage: host architecture armhf
dpkg-source --before-build libapache-mod-fastcgi-2.4.7~0910052141
debian/rules clean
dh_listpackages: Please specify the compatibility level in debian/compat
dh_listpackages: Compatibility levels before 5 are no longer supported (level 1 requested)
/usr/share/cdbs/1/rules/dpatch.mk:33: CDBS WARNING: dpatch.mk is deprecated since 0.4.85 - please use source format 3.0 (quilt) instead
test -x debian/rules
rmdir /tmp/libapache-mod-fastcgi-2.4.7~0910052141/build-tmp
rmdir: failed to remove ‘/tmp/libapache-mod-fastcgi-2.4.7~0910052141/build-tmp’: No such file or directory
/usr/share/cdbs/1/rules/buildcore.mk:46: recipe for target 'cleanbuilddir' failed
make: [cleanbuilddir] Error 1 (ignored)
dh_clean
dh_clean: Please specify the compatibility level in debian/compat
/usr/share/cdbs/1/rules/debhelper.mk:189: recipe for target 'clean' failed
make: *** [clean] Error 2
dpkg-buildpackage: error: debian/rules clean gave error exit status 2
Build command 'cd libapache-mod-fastcgi-2.4.7~0910052141 && dpkg-buildpackage -b -uc' failed.
E: Child process failed
I'm trying to build Apache2 on RPi also. These commands got the .deb building for me:
cd libapache-mod-fastcgi-2.4.7~0910052141;
echo 10 > debian/compat;
dpkg-buildpackage -b -uc
Then cd .. to go one level up, then install the package with dpkg -i ./libapache2-mod-fastcgi_2.4.7~0910052141-1.1+deb8u1_armhf.deb

Compiling issues : Apache headers not found - CentOS 6.x

I am trying to build libwurfl (https://github.com/filosganga/libwurfl) on CentOS. I have installed all the dependent libraries, but I am having issues with running configure for libwurfl. I am constantly getting issues with Apache headers not found issue.
If I use --with-apxs as shown below,
./configure --with-apxs=/usr/sbin/apxs/
Output:
checking for apr.h... yes
checking httpd.h usability... no
checking httpd.h presence... no
checking for httpd.h... no
configure: error: Apache headers not found.
If I add --with-apache
./configure --with-apxs=/usr/sbin/apxs/ --with-apache=/usr/include/httpd/
Output:
checking for apxs... no
checking apr.h usability... no
checking apr.h presence... no
checking for apr.h... no
configure: error: Apache Portable Runtime headers not found.
I see headers on both locations mentioned above.
Any pointers?
Thanks!
I compiled it on Ubuntu 14.04 after installing and configuring apr-1.5.2 and httpd 2.2.31. Then I compiled it in this way:./configure --with-apache='/usr/local/apache2'

Vagrant - Ansible error installing Apache

I'm working on a project with Vagrant and Ansible and Virtualbox.
When I try to install Apache on an ubuntu precise (14.04) box, Vagrant fails. I improved the answer after.
It seems a known bug, but even if I'm installing a newer version, the error shows up.
I tried also as stated here, but with no luck.
How can I resolve this issue?
Thank you.
UPDATED ANSWER
This is the Ansible task.
Version 1:
- name: Install Apache
sudo: yes
apt: pkg=apache2 state=latest
register: apache2_apt
Output:
failed: [default] => {"failed": true}
stderr: E: Sub-process /usr/bin/dpkg returned an error code (1)
stdout: Reading package lists...
Building dependency tree...
Reading state information...
Suggested packages:
www-browser apache2-doc apache2-suexec-pristine apache2-suexec-custom
The following NEW packages will be installed:
apache2
0 upgraded, 1 newly installed, 0 to remove and 183 not upgraded.
Need to get 0 B/146 kB of archives.
After this operation, 460 kB of additional disk space will be used.
(Reading database ... 52932 files and directories currently installed.)
Unpacking apache2 (from .../apache2_2.4.12-1+deb.sury.org~precise+5_amd64.deb) ...
dpkg: error processing /var/cache/apt/archives/apache2_2.4.12-1+deb.sury.org~precise+5_amd64.deb (--unpack):
error setting ownership of `/var/www/html.dpkg-new': Operation not permitted
Processing triggers for man-db ...
Processing triggers for ureadahead ...
Errors were encountered while processing:
/var/cache/apt/archives/apache2_2.4.12-1+deb.sury.org~precise+5_amd64.deb
msg: '/usr/bin/apt-get -y -o "Dpkg::Options::=--force-confdef" -o "Dpkg::Options::=--force-confold" install 'apache2'' failed: E: Sub-process /usr/bin/dpkg returned an error code (1)
FATAL: all hosts have already failed -- aborting
Version 2:
- name: Install Apache
command: "sudo apt-get install apache2"
register: apache2_apt
Output:
failed: [default] => {"changed": true, "cmd": ["sudo", "apt-get", "install", "apache2"], "delta": "0:00:07.745095", "end": "2015-06-09 11:08:53.726031", "rc": 100, "start": "2015-06-09 11:08:45.980936", "warnings": []}
stderr: E: Sub-process /usr/bin/dpkg returned an error code (1)
stdout: Reading package lists...
Building dependency tree...
Reading state information...
Suggested packages:
www-browser apache2-doc apache2-suexec-pristine apache2-suexec-custom
The following NEW packages will be installed:
apache2
0 upgraded, 1 newly installed, 0 to remove and 183 not upgraded.
Need to get 0 B/146 kB of archives.
After this operation, 460 kB of additional disk space will be used.
(Reading database ... 52932 files and directories currently installed.)
Unpacking apache2 (from .../apache2_2.4.12-1+deb.sury.org~precise+5_amd64.deb) ...
dpkg: error processing /var/cache/apt/archives/apache2_2.4.12-1+deb.sury.org~precise+5_amd64.deb (--unpack):
error setting ownership of `/var/www/html.dpkg-new': Operation not permitted
Processing triggers for man-db ...
Processing triggers for ureadahead ...
ureadahead will be reprofiled on next reboot
Errors were encountered while processing:
/var/cache/apt/archives/apache2_2.4.12-1+deb.sury.org~precise+5_amd64.deb
FATAL: all hosts have already failed -- aborting
There are few possible issues for this
You need to disable apparmor or better add a rule to apparmor service for ability to have access by the script to /var/www within guest machine
There is a trouble with host machine permissions for /var/www folder. Try to check if the user has access to local folder, mapped as shared folder from host to guest - possibly you need to add permissions for local user at host machine.
try to use ansible-galaxy and search for already created role with fixes for both previous issues

How to install Apache2::AuthCookie in Centos 6?

I am trying to install Apache2::AuthCookie on a CentOS 6 machine with the following command:
cpanm Apache2::AuthCookie
but I get the following error:
--> Working on Apache2::AuthCookie
Fetching http://www.cpan.org/authors/id/M/MS/MSCHOUT/Apache-AuthCookie-3.22.tar.gz ... OK
Configuring Apache-AuthCookie-3.22 ... OK
==> Found dependencies: autobox
--> Working on autobox
Fetching http://www.cpan.org/authors/id/C/CH/CHOCOLATE/autobox-2.82.tar.gz ... OK
Configuring autobox-2.82 ... OK
Building and testing autobox-2.82 ... FAIL
! Installing autobox failed. See /root/.cpanm/work/1415007741.22940/build.log for details. Retry with --force to force install it.
! Installing the dependencies failed: Module 'autobox' is not installed
! Bailing out the installation for Apache-AuthCookie-3.22.
Any ideas how to solve this problem?
build.log file
cpanm (App::cpanminus) 1.7014 on perl 5.010001 built for x86_64-linux-thread-multi
Work directory is /root/.cpanm/work/1415007741.22940
You have make /usr/bin/make
You have /usr/bin/wget
You have /bin/tar: tar (GNU tar) 1.23
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Written by John Gilmore and Jay Fenlason.
Searching Apache2::AuthCookie on cpanmetadb ...
--> Working on Apache2::AuthCookie
Fetching http://www.cpan.org/authors/id/M/MS/MSCHOUT/Apache-AuthCookie-3.22.tar.gz
-> OK
Unpacking Apache-AuthCookie-3.22.tar.gz
Entering Apache-AuthCookie-3.22
Checking configure dependencies from META.yml
Configuring Apache-AuthCookie-3.22
Running Makefile.PL
[ info] generating script t/TEST
Checking if your kit is complete...
Looks good
Warning: prerequisite autobox 1.1 not found.
Generating a Unix-style Makefile
Writing Makefile for Apache::AuthCookie
Writing MYMETA.yml and MYMETA.json
-> OK
Checking dependencies from MYMETA.json ...
Checking if you have Test::More 0 ... Yes (1.001008)
Checking if you have ExtUtils::MakeMaker 0 ... Yes (7.00)
Checking if you have Apache::Test 1.35 ... Yes (1.38)
Checking if you have Class::Load 0.03 ... Yes (0.22)
Checking if you have autobox 1.1 ... No
Checking if you have mod_perl2 1.999022 ... Yes (2.000004)
Checking if you have CGI 3.12 ... Yes (4.09)
==> Found dependencies: autobox
Searching autobox on cpanmetadb ...
--> Working on autobox
Fetching http://www.cpan.org/authors/id/C/CH/CHOCOLATE/autobox-2.82.tar.gz
-> OK
Unpacking autobox-2.82.tar.gz
Entering autobox-2.82
Checking configure dependencies from META.json
Checking if you have ExtUtils::MakeMaker 0 ... Yes (7.00)
Configuring autobox-2.82
Running Makefile.PL
Checking if your kit is complete...
Looks good
Generating a Unix-style Makefile
Writing Makefile for autobox
Writing MYMETA.yml and MYMETA.json
-> OK
Checking dependencies from MYMETA.json ...
Checking if you have Scope::Guard 0.20 ... Yes (0.20)
Checking if you have ExtUtils::MakeMaker 0 ... Yes (7.00)
Building and testing autobox-2.82
cp lib/autobox.pod blib/lib/autobox.pod
cp lib/autobox/universal.pm blib/lib/autobox/universal.pm
cp lib/autobox.pm blib/lib/autobox.pm
Running Mkbootstrap for autobox ()
chmod 644 "autobox.bs"
"/usr/bin/perl" "/usr/share/perl5/ExtUtils/xsubpp" -typemap "/usr/share/perl5/ExtUtils/typemap" autobox.xs > autobox.xsc && mv autobox.xsc autobox.c
gcc -c -I. -D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O3 -Wall -DVERSION=\"2.82\" -DXS_VERSION=\"2.82\" -fPIC "-I/usr/lib64/perl5/CORE" autobox.c
/bin/sh: gcc: command not found
make: *** [autobox.o] Error 127
-> FAIL Installing autobox failed. See /root/.cpanm/work/1415007741.22940/build.log for details. Retry with --force to force install it.
-> FAIL Installing the dependencies failed: Module 'autobox' is not installed
-> FAIL Bailing out the installation for Apache-AuthCookie-3.22.
After looking inside the log files I found out that I a compiler was missing.
yum install gcc-c++