我有 PHP 7.2.5,我需要升级到最新的 PHP。
首先我通过执行清除旧的 phpapt-get purge php7
然后我下载php-7.3.7将其提取到我的网络服务器并执行./configure && make && make install
,然后通过执行重新启动 apache2systemctl restart apache2
这是我执行后得到的结果make install
:
Installing shared extensions: /usr/local/lib64/extensions/debug-non-zts-20180731/
Installing PHP CLI binary: /usr/local/bin/
Installing PHP CLI man page: /usr/local/php/man/man1/
Installing phpdbg binary: /usr/local/bin/
Installing phpdbg man page: /usr/local/php/man/man1/
Installing PHP CGI binary: /usr/local/bin/
Installing PHP CGI man page: /usr/local/php/man/man1/
Installing build environment: /usr/local/lib64/build/
Installing header files: /usr/local/include/php/
Installing helper programs: /usr/local/bin/
program: phpize
program: php-config
Installing man pages: /usr/local/php/man/man1/
page: phpize.1
page: php-config.1
Installing PEAR environment: /usr/local/lib64/php/
[PEAR] Archive_Tar - installed: 1.4.7
[PEAR] Console_Getopt - installed: 1.4.2
[PEAR] Structures_Graph- installed: 1.1.1
[PEAR] XML_Util - installed: 1.4.3
[PEAR] PEAR - installed: 1.10.9
Wrote PEAR system config file at: /usr/local/etc/pear.conf
You may want to add: /usr/local/lib64/php to your php.ini include_path
/srv/www/vhosts/xdebug/php-7.3.7/build/shtool install -c ext/phar/phar.phar /usr/local/bin
ln -s -f phar.phar /usr/local/bin/phar
如果我执行 phpinfo.php,那么它只会下载该文件,因为它无法解释 php...