php安装过程中各种报错
1.error: xslt-config not found. Please reinstall the libxslt >= 1.1.0 distribution
wget https://nih.at/libzip/libzip-1.2.0.tar.gz
tar -zxvf libzip-1.2.0.tar.gz
cd libzip-1.2.0
./configure
make && make install
2.ERROR: cannot verify nih.at’s certificate, issued by ‘/C=US/O=Let’s Encrypt/CN=R3’: Issued certificate has expired. To connect to nih.at insecurely, use `–no-check-certificate’.
sudo yum install -y ca-certificates
wget --no-check-certificate https://xxxxx
3.configure: error: off_t undefined; check your library configuration
echo '/usr/local/lib64
/usr/local/lib
/usr/lib
/usr/lib64'>>/etc/ld.so.conf&&ldconfig -v
4.yum报错意外终止
yum upgrade --skip-broken
5.configure: error: Unable to locate gmp.h
yum install gmp-devel
6.fatal error: zipconf.h: No such file or directory
cp /usr/local/lib/libzip/include/zipconf.h /usr/local/include/zipconf.h
7.cc: internal compiler error: Killed (program cc1)
sudo dd if=/dev/zero of=/swapfile bs=64M count=16
sudo mkswap /swapfile
sudo swapon /swapfile
完成后
sudo swapoff /swapfile
sudo rm /swapfile
8.mysql -uroot -p
bash: mysql: command not found…
系统默认会查找/usr/bin下的命令
mysql的路径是:/usr/local/mysql/bin/mysql
ln -s /usr/local/mysql/bin/mysql /usr/bin
9.mysql -u root -p
ERROR 1045 (28000): Access denied for user ‘root‘@‘localhost‘ (using password: YES)
跳过密码-设置密码
/etc/mysql.conf
添加
[mysqld]
skip-grant-tables
保存
sudo service mysql restart
不输入密码回车进入
flush privileges;
ALTER USER ‘root’@‘localhost’ IDENTIFIED BY ‘密码’
quit
/etc/mysql.conf 删除 skip-grant-tables
sudo service mysql restart