这有点奇怪。当我跑步时,sudo apt-get install php7.0-sqlite3
有人告诉我
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.0-sqlite3 : Depends: php7.0-common (= 7.0.4-7ubuntu2) but 7.0.8-0ubuntu0.16.04.3 is to be installed
E: Unable to correct problems, you have held broken packages.
然而php7.0-sqlite3 的页面然后它将7.0.8-0ubuntu0.16.04.3
版本列为php7.0-common
受支持的依赖项。那么为什么无法安装呢?
我尝试过运行、、apt-get update
等等,但都无济于事。apt-get upgrade
apt-get install -f
apt-get dist-upgrade
答案1
有几种方法我会告诉你两个
您首先需要安装这并通过终端运行命令,如果仍然不起作用,请尝试以下步骤:
通过搜索或直接按打开终端
Ctrl+Alt+T
首先做
sudo apt-get -f install
然后
sudo dpkg --configure -a
然后再次运行
sudo apt-get -f install
如果你得到这个:
0 upgraded, 0 newly installed, 0 to remove and 2 not upgraded.
那么它不起作用,那么你试试第二种方法
sudo apt-get -u dist-upgrade
如果它显示任何被保留的软件包,最好将其删除。软件包被保留是因为apt
无法解决的依赖冲突。尝试以下命令来查找和修复冲突:
sudo apt-get -o Debug::pkgProblemResolver=yes dist-upgrade
那么它应该看起来像这样
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
如果仍然出现错误,请尝试:
确保全部勾选