Memcache在CentOS上build立错误

我在CentOS 7上安装“Pterodactyl Panel”时遇到了问题。我被卡在“pecl install memcache”这一行。 错误如下所示:

[root@localhost ~]# pecl install memcache WARNING: channel "pecl.php.net" has updated its protocols, use "pecl channel-update pecl.php.net" to update downloading memcache-2.2.7.tgz ... Starting to download memcache-2.2.7.tgz (36,459 bytes) ..........done: 36,459 bytes 11 source files, building running: phpize Configuring for: PHP Api Version: 20160303 Zend Module Api No: 20160303 Zend Extension Api No: 320160303 Enable memcache session handler support? [yes] : y building in /var/tmp/pear-build-rootEloe5R/memcache-2.2.7 running: /var/tmp/memcache/configure --with-php-config=/usr/bin/php-config --enable-memcache-session=y 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 for cc... no checking for gcc... no configure: error: in `/var/tmp/pear-build-rootEloe5R/memcache-2.2.7': configure: error: no acceptable C compiler found in $PATH See `config.log' for more details ERROR: `/var/tmp/memcache/configure --with-php-config=/usr/bin/php-config --enable-memcache-session=y' failed [root@localhost ~]# configure: error: in `/var/tmp/pear-build-rootEloe5R/memcache-2.2.7' 

这是一个带有Centos 7的新格式的VPS。我从本教程的开始部分开始安装“Pterodactyl面板”。

这些是我在执行之前执行的命令:

 yum install -y epel-release https://centos7.iuscommunity.org/ius-release.rpm yum update -y yum install -y httpd openssl-devel php71u php71u-common php71u-fpm php71u-cli php71u-json php71u-mysqlnd php71u-mcrypt php71u-gd php71u-mbstring php71u-pdo php71u-zip php71u-bcmath php71u-dom php71u-opcache php71u-devel pecl php71u-devel pecl pear1u memcached # Enable Memcached systemctl enable memcached systemctl start memcached # Install PHP Module pecl install memcache 

这是错误

 configure: error: no acceptable C compiler found in $PATH 

您没有安装编译器

 yum install gcc