执行 fc-cache -fv
命令的时候报 -bash: fc-cache: command not found
错误,需要安装 fontconfig
解决。
CentOS:
yum install fontconfig -y
Ubuntu/Debian
apt-get install fontconfig
解决程序开发和服务器部署中所遇到的疑难杂症。
执行 fc-cache -fv
命令的时候报 -bash: fc-cache: command not found
错误,需要安装 fontconfig
解决。
CentOS:
yum install fontconfig -y
Ubuntu/Debian
apt-get install fontconfig
linux 系统可能没有自带 ping 工具。当用到 ping 如果没有安装就会出现 --bash: ping: command not found
,需要我们自己安装。
yum install iputils -y
apt-get install inetutils-ping -y
linux 系统可能没有自带 ifconfig 工具。当用到 ifconfig 如果没有安装就会出现 --bash: ifconfig: command not found
,需要我们自己安装。
yum install net-tools -y
apt install net-tools -y
解决执行 pecl upgrade-all
提示 Error getting channel info from pear.php.net: Connection to `ssl://pear.php.net:443' failed:
和 Connection to 'ssl://pecl.php.net:443' failed: Unable to find the socket
错误。
出现这个错误主要是因为缺失默认证书导致的,具体原因不明。
下面说一下解决方案:
php -r "print_r(openssl_get_cert_locations());"
wget -P /etc/ssl/ http://curl.haxx.se/ca/cacert.pem
chmod 744 /etc/ssl/cacert.pem
注意:其中 /etc/ssl/cacert.pem 替换为自己的真实路径
CentOS 7/8 安装 oniguruma
和oniguruma-devel
。解决 configure: error: Package requirements (oniguruma) were not met: Package 'oniguruma', required by 'virtual:world', not found
问题。
yum -y install http://mirror.centos.org/centos-7/7.7.1908/cloud/x86_64/openstack-queens/oniguruma-6.7.0-1.el7.x86_64.rpm
yum -y install http://mirror.centos.org/centos-7/7.7.1908/cloud/x86_64/openstack-queens/oniguruma-devel-6.7.0-1.el7.x86_64.rpm
备用下载:
oniguruma:http://down.24kplus.com/linux/oniguruma/oniguruma-6.7.0-1.el7.x86_64.rpm
oniguruma-devel:http://down.24kplus.com/linux/oniguruma/oniguruma-devel-6.7.0-1.el7.x86_64.rpm
yum config-manager --set-enabled PowerTools
yum -y install oniguruma oniguruma-devel
linux 系统没有自带 wget
工具。当用到 wget
如果没有安装就会出现 --bash: wget: command not found
,需要我们自己安装。
yum install wget -y
apt install wget -y
CentOS 8 系统没有自带 tar 的压缩解压工具。当用到 tar 如果没有安装就会出现 -bash: tar: Command Not Found
,需要我们自己安装。
执行:
yum install tar -y
linux 系统没有自带 zip 的压缩解压工具。当用到 zip 或者 unzip 如果没有安装就会出现 -bash: unzip: Command Not Found
或 -bash: zip: Command Not Found
,需要我们自己安装。
yum install -y unzip zip
sudo apt-get install zip
解决 configure: error: C++ preprocessor "/lib/cpp" fails sanity check
错误,执行以下:
yum install gcc-c++
CentOS 安装 libtool 2.4.6, 解决 error: Libtool library used but 'LIBTOOL' is undefined
错误 。
wget http://ftpmirror.gnu.org/libtool/libtool-2.4.6.tar.gz
tar -zxf libtool-2.4.6.tar.gz
cd libtool-2.4.6
备用下载地址:https://down.24kplus.com/linux/libtool-2.4.6.tar.gz
./configure --prefix=/usr
make
sudo make install
sudo ldconfig