报错: configure: error: no acceptable C compiler found in $PATH
安装 gcc apt install gcc
报错
1 2 3
configure: error: The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config.
安装 pkg-config
1
apt install pkg-config
报错
1 2
configure: error: Package requirements (libxml-2.0 >= 2.7.6) were not met: No package 'libxml-2.0' found
安装 libxml
1 2
apt install libxml2 apt install libxml2-dev
报错
1 2 3
configure: error: Package requirements (krb5-gssapi krb5) were not met: No package 'krb5-gssapi' found No package 'krb5' found
安装 libkrb5
1
apt install libkrb5-dev
报错
1 2 3 4
configure: error: Package requirements (openssl >= 1.0.1) were not met: No package 'openssl' found
Consider adjusting the PKG_CONFIG_PATH environment variable if you
安装 libssl-dev
1
apt install libssl-dev
报错
1 2
configure: error: Package requirements (sqlite3 > 3.7.4) were not met: No package 'sqlite3' found
安装 libsqlite3-dev
1
apt install libsqlite3-dev
报错
1 2
configure: error: Package requirements (oniguruma) were not met: No package 'oniguruma' found
这个包在 apt 里没找到只能自己编译安装了
编译安装 oniguruma
1 2 3 4 5
cd /opt wget https://github.com/kkos/oniguruma/archive/v6.9.4.tar.gz -O oniguruma-6.9.4.tar.gz tar -zxf oniguruma-6.9.4.tar.gz cd oniguruma-6.9.4 ./autogen.sh
报错
1 2
Generating autotools files. ./autogen.sh: 6: ./autogen.sh: autoreconf: not found
configure: error: Package requirements (libxslt >= 1.1.0) were not met: No package 'libxslt' found
安装 libxslt1-dev
1
apt install libxslt1-dev
终于 configure 通过
1 2 3 4 5 6 7 8 9 10
+--------------------------------------------------------------------+ | License: | | This software is subject to the PHP License, available in this | | distribution in the file LICENSE. By continuing this installation | | process, you are bound by the terms of this license agreement. | | If you do not agree with the terms of this license, you must abort | | the installation process at this point. | +--------------------------------------------------------------------+
Thank you for using PHP.
太不容易了
激动人心的 make && make install
1
make && make install
1 2 3 4 5 6 7 8 9 10 11
[PEAR] Archive_Tar - installed: 1.4.9 [PEAR] Console_Getopt - installed: 1.4.3 [PEAR] Structures_Graph- installed: 1.1.1 [PEAR] XML_Util - installed: 1.4.5 warning: pear/PEAR dependency package "pear/Archive_Tar" installed version 1.4.9 is not the recommended version 1.4.4 [PEAR] PEAR - installed: 1.10.12 Wrote PEAR system config file at: /usr/local/php/etc/pear.conf You may want to add: /usr/local/php/lib/php to your php.ini include_path /opt/php74/build/shtool install -c ext/phar/phar.phar /usr/local/php/bin/phar.phar ln -s -f phar.phar /usr/local/php/bin/phar Installing PDO headers: /usr/local/php/include/php/ext/pdo/