在我的 VPS 上执行 do-release-upgrade 从 15.10 升级到 16.04 后,每次 apt-get 安装后都会出现此消息...(从法语翻译而来,抱歉)
Reading packages list... Done
Building dependency tree
Reading state information... Done
You can run « apt-get -f install » to fix these issues:
The following packages contains some unsatisfied dependencies:
php-pear : Depends on: php-cli
Dépends on: php-xml
phpmyadmin : Depends on: libapache2-mod-php or
libapache2-mod-phpfilter but it is not installable or
php-cgi or
php-fpm or
php
Depends on: php-mysql but it is not installable or
php-mysqli or
php-mysqlnd
Depends on: php-json
Depends on: php-mbstring
Depends on: php-phpseclib (>= 2.0)
Recommend: php-gd
python-letsencrypt-apache : Dépend: letsencrypt (>= 0.4.1~) but it won't be installed
Dépend: python-acme but it won't be installed
Dépend: python-augeas but it won't be installed
Dépend: python-letsencrypt but it won't be installed
Dépend: python-mock but it won't be installed
Dépend: python-zope.component but it won't be installed
roundcube : Depends on: roundcube-core (= 1.2~beta+dfsg.1-0ubuntu1) but 1.1.1+dfsg.1-2 should be installed
E: Dependencies unsatified. Try « apt-get -f install » with no package
(or indicate a solution).
如果我尝试 apt-get -f install,会出现以下问题:
Reading packages list... Done
Building dependency tree
Reading state information... Done
Fixing dependencies... Fait
The following additional packages will be installed:
apache2 apache2-bin apache2-data libapache2-mod-php libapache2-mod-php7.0 libxslt1.1 php-cli
php-gd php-intl php-ldap php-mbstring php-mcrypt php-mysql php-net-ldap2 php-net-ldap3
php-net-sieve php-phpseclib php-pspell php-xml php7.0-cli php7.0-common php7.0-gd php7.0-intl
php7.0-json php7.0-ldap php7.0-mbstring php7.0-mcrypt php7.0-mysql php7.0-opcache php7.0-pspell
php7.0-readline php7.0-xml roundcube-core roundcube-mysql
Packages suggested :
apache2-suexec-pristine | apache2-suexec-custom php-libsodium php-gmp php-crypt-gpg
roundcube-plugins
The following packages will be REMOVED :
libapache2-mod-php5 php5 php5-cli
The NEW following packages will be installed :
libapache2-mod-php libapache2-mod-php7.0 libxslt1.1 php-cli php-gd php-intl php-ldap
php-mbstring php-mcrypt php-mysql php-net-ldap2 php-net-ldap3 php-net-sieve php-phpseclib
php-pspell php-xml php7.0-cli php7.0-common php7.0-gd php7.0-intl php7.0-json php7.0-ldap
php7.0-mbstring php7.0-mcrypt php7.0-mysql php7.0-opcache php7.0-pspell php7.0-readline
php7.0-xml
The following packages will be updated:
apache2 apache2-bin apache2-data roundcube-core roundcube-mysql
5 updated, 29 newly installed, 3 to remove et 298 not updated.
7 partially installed or removed.
It is necessary to take 0 o/7 871 ko in the repositories.
After this operation, 3 528 ko extra disk space will be used.
Do you wish to continue ? [Y/n] Y
Extract models from packages : 100%
Preconfigurate packages...
(Reading the database... 103893 files and folders already installed.)
Prepaare unpacking .../roundcube-core_1.2~beta+dfsg.1-0ubuntu1_all.deb ...
dpkg-maintscript-helper: error: directory '/var/lib/roundcube/config' contains files not owned by package roundcube-core:all, cannot switch to symlink
dpkg: error while treating the archive /var/cache/apt/archives/roundcube-core_1.2~beta+dfsg.1-0ubuntu1_all.deb (--unpack) :
the sub-process new script pre-installation returned an exit state error 1
dbconfig-common: flushing administrative password
Some errors have occurred during the execution :
/var/cache/apt/archives/roundcube-core_1.2~beta+dfsg.1-0ubuntu1_all.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
此外,当我登录服务器时,我有:
New release '16.04 LTS' available.
Run 'do-release-upgrade' to upgrade to it.
但如果我运行“do-release-upgrade”,我会得到
Checking for a new Ubuntu release
No new release found
最后,我感觉被困住了。我该怎么办?
编辑:
apt-get do-release-upgrade -d
安装 16.10后,我的依赖项仍然存在相同的问题:
root@xxxxxxx:~# LC_ALL=C apt-get -f install
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following packages were automatically installed and are no longer required:
libdbd-mysql-perl libdbi-perl libmysqlclient20 libprocps4
libterm-readkey-perl libzip4 php-bz2 php-zip php7.0-bz2 php7.0-zip
Use 'apt autoremove' to remove them.
The following additional packages will be installed:
roundcube-core
Suggested packages:
roundcube-plugins php-net-ldap2 php-net-ldap3
The following packages will be upgraded:
roundcube-core
1 upgraded, 0 newly installed, 0 to remove and 373 not upgraded.
27 not fully installed or removed.
Need to get 0 B/1975 kB of archives.
After this operation, 3996 kB of additional disk space will be used.
Do you want to continue? [Y/n] Y
Preconfiguring packages ...
(Reading database ... 104442 files and directories currently installed.)
Preparing to unpack .../roundcube-core_1.2.0+dfsg.1-1_all.deb ...
dpkg-maintscript-helper: error: directory '/var/lib/roundcube/config' contains files not owned by package roundcube-core:all, cannot switch to symlink
dpkg: error processing archive /var/cache/apt/archives/roundcube-core_1.2.0+dfsg.1-1_all.deb (--unpack):
subprocess new pre-installation script returned error exit status 1
dbconfig-common: flushing administrative password
Errors were encountered while processing:
/var/cache/apt/archives/roundcube-core_1.2.0+dfsg.1-1_all.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
答案1
为了在正式发布之前升级到 16.04,请指定 -d 选项以使用开发版本sudo do-release-upgrade -d
:(摘自digitalocean.com)