今天小编购买了亚洲云新上线的香港精品服务器。安装了宝塔。然后在安装php时怎么都无法启动。报错如下:
复制
/www/server/php/80/sbin/php-fpm: error while loading shared libraries: libonig.so.5: cannot open shared object file: No such file or directory
应该时缺少libonig依赖库。那么就安装一下即可。
我用的时Debian10,如果你时ubuntu一样适用。
SSH安装libonig:
复制
apt-get install libonig-dev -y
然后又报错了:
复制
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
bt-nginx120 : Depends: liblua5.1-0 but it is not going to be installed
bt-php80 : Depends: libonig5 (>= 6.8.1) but it is not going to be installed
Depends: libsodium23 (>= 1.0.14) but it is not going to be installed
libonig-dev : Depends: libonig5 (= 6.9.1-1) but it is not going to be installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
问题不大,按指导修复:
复制
apt --fix-broken install
一顿操作后,修复完成。自动配置软件。
复制
Setting up libsodium23:amd64 (1.0.17-1) ...
Setting up liblua5.1-0:amd64 (5.1.5-8.1+b2) ...
Setting up libonig5:amd64 (6.9.1-1) ...
Setting up bt-nginx120 (1.20.0) ...
Setting up bt-php80 (8.0.6) ...
Processing triggers for libc-bin (2.28-10) ...
此时问题就已经修复了。去宝塔面板重启下php8.0即可。