![apt-get 命令不同步](https://linux22.com/image/878699/apt-get%20%E5%91%BD%E4%BB%A4%E4%B8%8D%E5%90%8C%E6%AD%A5.png)
我正在运行 Ubuntu Server 15.10,突然apt-get
搞不清楚哪些包是必需的,哪些不是。我想我apt-get -f install
在发生这种情况之前就运行过了,因为有未满足的依赖关系。
当我运行 dist-upgrade 时,它告诉我有很多东西可以删除:
$ sudo apt-get dist-upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... The following package was automatically installed and is no longer required:
aspell aspell-en dictionaries-common emacsen-common enchant hunspell-en-us
libaspell15 libenchant1c2a libhunspell-1.3-0 libhunspell-1.3-0v5 libqdbm14
libxslt1.1 php-common
Use 'apt-get autoremove' to remove it.
Done
The following packages have been kept back:
php-pear
0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
因此我运行了自动删除,但是随后发生了以下情况:
$ sudo apt-get autoremove
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
php-common
0 upgraded, 0 newly installed, 1 to remove and 1 not upgraded.
After this operation, 62,5 kB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 106550 files and directories currently installed.)
Removing php-common (18+deb.sury.org~wily+1) ...
root root 1733 /var/lib/php/sessions
我真的不知道该怎么做,我尝试再次执行更新&&dist-upgrade,php-common
重新安装,并一直说我应该运行自动删除。
我不知道该怎么做。
更多信息
输出apt-cache policy php-pear
php-pear:
Installed: 5.6.11+dfsg-1ubuntu3.1
Candidate: 1:1.10.1+submodules+notgz-3+deb.sury.org~wily+2
Version table:
1:1.10.1+submodules+notgz-3+deb.sury.org~wily+2 0
500 http://ppa.launchpad.net/ondrej/php-7.0/ubuntu/ wily/main amd64 Packages
*** 5.6.11+dfsg-1ubuntu3.1 0
500 http://archive.ubuntu.com/ubuntu/ wily-updates/main amd64 Packages
500 http://security.ubuntu.com/ubuntu/ wily-security/main amd64 Packages
100 /var/lib/dpkg/status
5.6.11+dfsg-1ubuntu3 0
500 http://archive.ubuntu.com/ubuntu/ wily/main amd64 Packages
输出apt-cache policy php-common
php-common:
Installed: 18+deb.sury.org~wily+1
Candidate: 18+deb.sury.org~wily+1
Version table:
*** 18+deb.sury.org~wily+1 0
500 http://ppa.launchpad.net/ondrej/php-7.0/ubuntu/ wily/main amd64 Packages
100 /var/lib/dpkg/status
答案1
该软件包php-common
不在标准 Wily 存储库中。但您已添加 PPA,ppa:ondrej/php-7.0
并且此 PPA 中的软件包php-pear
依赖于php-common
,而 也位于此 PPA 中。
您的问题是,php-pear
无论出于何种原因,都无法安装,但是php-common
。因此,将安装该软件包,但后来才发现它是不必要的,因为无法安装php-common
“父”软件包。php-pear