【发布时间】:2018-08-18 17:02:34
【问题描述】:
我已经搜索但找不到有用的资源,所以我必须大声说出来。请帮我。我误跑了sudo apt-get upgrade -u dist-upgrade
之后,我服务器上的所有网站都停止了工作。我试图通过输入php -v来检查是否仍然安装了Php,但我得到了
-bash: php: command not found
我也尝试重新安装 php 使用
sudo apt-get install php
我看到了这个
sudo apt-get install php
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
php : Depends: php7.2 but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
然后我尝试运行
Sudo apt-get install php7.2
我看到了这个
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
php7.2 : Depends: libapache2-mod-php7.2 but it is not going to be installed or
php7.2-fpm but it is not going to be installed or
php7.2-cgi but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
我也尝试安装模块:我明白了:
root@matrixpluspluto:~# sudo apt-get install php7.2 php7.2-cli php7.2-c
gi php7.2-fpm libapache2-mod-php7.2 php7.2-opcache
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
libapache2-mod-php7.2 : Depends: libc6 (>= 2.27) but 2.24-11+deb9u1 is to be installed
Depends: libsodium23 (>= 1.0.14) but it is not going to be installed
php7.2-cgi : Depends: libc6 (>= 2.27) but 2.24-11+deb9u1 is to be installed
Depends: libsodium23 (>= 1.0.14) but it is not going to be installed
php7.2-cli : Depends: libc6 (>= 2.27) but 2.24-11+deb9u1 is to be installed
Depends: libsodium23 (>= 1.0.14) but it is not going to be installed
php7.2-fpm : Depends: libc6 (>= 2.27) but 2.24-11+deb9u1 is to be installed
Depends: libsodium23 (>= 1.0.14) but it is not going to be installed
php7.2-opcache : Depends: libc6 (>= 2.27) but 2.24-11+deb9u1 is to be installed
E: Unable to correct problems, you have held broken packages.
我检查并看到已经安装了 libc6 v2.24 请帮我。在此之前我使用的是 php7.1,升级后我开始看到 7.2。我对 php 所做的任何事情都没有成功。 Pove 已尝试解决此问题超过 2 天,请帮助。
【问题讨论】:
-
你能不能
purge/remove现有的php并重新安装。这应该工作 -
尝试运行
sudo apt install php7.2 php7.2-common php7.2-cli php7.2-fpm并关注ayesh.me/Ubuntu-PHP-7.2 看看是否有帮助 -
我尝试删除。
sudo apt-get purge php Reading package lists... Done Building dependency tree Reading state information... Done Package 'php' is not installed, so not removed'这就是我得到的 -
@BlackMamba 我试过了,没用
-
任何新错误??
标签: php debian upgrade apt-get server-configuration