今天上php.net看了下,php7.3.1已经出来差不多快一个月了,想安装看一下php7.3和php7.2相比又有那些变化!
[root@localhost ~]# cd php-7.3.1
[root@localhost php-7.3.1]# ./configure --prefix=/usr/local/php --with-curl --with-freetype-dir --with-gd --with-gettext --with-iconv-dir --with-kerberos --with-libdir=lib64 --with-libxml-dir --with-mysqli --with-openssl --with-pcre-regex --with-pdo-mysql --with-pdo-sqlite --with-pear --with-png-dir --with-jpeg-dir --with-xmlrpc --with-xsl --with-zlib --with-bz2 --with-mhash --enable-fpm --enable-bcmath --enable-libxml --enable-inline-optimization --enable-gd-native-ttf --enable-mbregex --enable-mbstring --enable-opcache --enable-pcntl --enable-shmop --enable-soap --enable-sockets --enable-sysvsem --enable-sysvshm --enable-xml --enable-zip
configure: WARNING: unrecognized options: --enable-gd-native-ttf
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for a sed that does not truncate output... /usr/bin/sed
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking target system type... x86_64-pc-linux-gnu
checking for cc... no
checking for gcc... no
configure: error: in `/root/php-7.3.1':
configure: error: no acceptable C compiler found in $PATH
See `config.log' for more details
[root@localhost php-7.3.1]#
在配置过程中,有一个warning,提示无法识别,configure: WARNING: unrecognized options: –enable-gd-native-ttf,看样是php7.3不支持这个选项了,查了下资料确认–enable-gd-native-ttf 这个选项已经被废弃,在这里的解决方法是把这个废弃的选项从配置选项中删除就可以。
另后面还有报错;
checking for cc... no
checking for gcc... no
configure: error: in `/root/php-7.3.1':
configure: error: no acceptable C compiler found in $PATH
See `config.log' for more details
这里的报错,是没有安装gcc编辑器导致的,我们直接采用yum安装方式把gcc安装上就可以,以下是安装命令
yum -y install gcc-c++