我正在尝试升级我的VPS,它安装了Debian8.11Jessie。为了做大的升级,我首先做一个小的升级。我做了以下工作,我知道这是通常的路线:
sudo apt-get update
sudo apt-get upgrade
sudo sed -i 's/jessie/stretch/g' /etc/apt/sources.list
sudo apt-get update一切顺利,然后我就跑了:
sudo apt-get upgrade我收到以下错误:
The following packages have unmet dependencies:
libmariadb3 : Breaks: libmariadbclient18 (< 1:10.3.12-2) but 10.1.37-0+deb9u1 is to be installed
libssl1.1 : Breaks: python-httplib2 (< 0.11.3-1) but 0.9.2+dfsg-1 is to be installed
E: Broken packages我试着删除python-httplib2,但与往常一样,apt希望删除系统上的重要包,这肯定会导致它永久崩溃。我不知道libmariadb3包,但我在一个生产网站上使用MySQL,所以我假设它会想要删除所有类型的这样做。
Package files:
100 /var/lib/dpkg/status
release a=now
500 http://ftp.us.debian.org/debian testing/non-free amd64 Packages
release o=Debian,a=testing,n=buster,l=Debian,c=non-free,b=amd64
origin ftp.us.debian.org
500 http://ftp.us.debian.org/debian testing/contrib amd64 Packages
release o=Debian,a=testing,n=buster,l=Debian,c=contrib,b=amd64
origin ftp.us.debian.org
500 http://ftp.us.debian.org/debian testing/main amd64 Packages
release o=Debian,a=testing,n=buster,l=Debian,c=main,b=amd64
origin ftp.us.debian.org
500 http://ftp.us.debian.org/debian stretch-updates/main amd64 Packages
release o=Debian,a=stable-updates,n=stretch-updates,l=Debian,c=main,b=amd64
origin ftp.us.debian.org
500 http://security.debian.org stretch/updates/main amd64 Packages
release v=9,o=Debian,a=stable,n=stretch,l=Debian-Security,c=main,b=amd64
origin security.debian.org
500 http://ftp.us.debian.org/debian stretch/main amd64 Packages
release v=9.7,o=Debian,a=stable,n=stretch,l=Debian,c=main,b=amd64
origin ftp.us.debian.org
Pinned packages:deb http://ftp.us.debian.org/debian stretch main
deb http://security.debian.org/ stretch/updates main
deb http://ftp.us.debian.org/debian stretch-updates main
deb http://ftp.us.debian.org/debian testing main contrib non-free我已经从我的源代码中删除了deb http://ftp.us.debian.org/debian testing main contrib non-free,并且能够删除libmariadb3,因为我意识到,当我升级时,我可以重新安装任何与此相关的包(default-libmysqlclient-dev libmariadb-dev libmariadb-dev-compat libmariadb3),但是尝试删除libssl1.1 (它是从源代码手工编译的)将对我的系统造成损害,因为它希望删除:
apt-transport-https autoconf automake bind9-host build-essential ca-certificates cloud-init cloud-initramfs-growroot cloud-utils curl dh-python dnsutils
dpkg-dev euca2ools ghostscript git host libalgorithm-c3-perl libalgorithm-diff-perl libalgorithm-diff-xs-perl libalgorithm-merge-perl libarchive-extract-perl
libauthen-sasl-perl libbind9-90 libcgi-fast-perl libcgi-pm-perl libclass-accessor-perl libclass-c3-perl libclass-c3-xs-perl libcpan-meta-perl libcups2
libcupsfilters1 libcupsimage2 libcurl3-gnutls libcurl4 libdata-optlist-perl libdata-section-perl libdbd-mysql-perl libdbi-perl libdns100 libdpkg-perl
libencode-locale-perl liberror-perl libfcgi-perl libfile-fcntllock-perl libfile-listing-perl libfont-afm-perl libgs9 libgssapi-krb5-2 libgtk2.0-0 libgtk2.0-bin
libhtml-form-perl libhtml-format-perl libhtml-parser-perl libhtml-tagset-perl libhtml-template-perl libhtml-tree-perl libhttp-cookies-perl libhttp-daemon-perl
libhttp-date-perl libhttp-message-perl libhttp-negotiate-perl libintl-perl libio-html-perl libio-socket-ssl-perl libio-string-perl libisccfg90 libkrb5-3
liblog-message-perl liblog-message-simple-perl liblwp-mediatypes-perl liblwp-protocol-https-perl libmailtools-perl libmodule-build-perl
libmodule-pluggable-perl libmodule-signature-perl libmro-compat-perl libnet-http-perl libnet-smtp-ssl-perl libnet-ssleay-perl libpackage-constants-perl
libparams-util-perl libparse-debianchangelog-perl libperl4-corelibs-perl libpod-latex-perl libpod-readme-perl libpython3-stdlib libpython3.5-minimal
libpython3.5-stdlib libregexp-common-perl libsoftware-license-perl libssl-dev libssl1.1 libsub-exporter-perl libsub-install-perl libsub-name-perl
libswitch-perl libterm-readkey-perl libterm-ui-perl libtext-soundex-perl libtext-template-perl libtext-unidecode-perl libtimedate-perl libtirpc1 liburi-perl
libwww-perl libwww-robotrules-perl libxml-libxml-perl libxml-namespacesupport-perl libxml-parser-perl libxml-sax-base-perl libxml-sax-expat-perl
libxml-sax-perl lsof mutt mysql-client-5.5 mysql-server mysql-server-5.5 mysqltuner nfs-common openssh-client openssh-server openssh-sftp-server openssl perl
perl-modules pinentry-gtk2 python-boto python-chardet-whl python-pip python-pip-whl python-reportbug python-requestbuilder python-requests python-requests-whl
python-software-properties python-virtualenv python3 python3-apt python3-minimal python3-pkg-resources python3-virtualenv python3.5 python3.5-minimal rename
reportbug rpcbind sendmail sendmail-base sendmail-bin texinfo unattended-upgrades virtualenv发布于 2019-02-11 11:51:54
警告!!不要做我所做的事,不首先了解潜在的风险!你已经被警告好了,所以我只是想我会‘冒险它一块饼干’,并允许倾向于删除它想删除的东西。幸运的是,世界确实结束了,我的系统现在运转良好。来详细说明我做了什么:
sudo apt remove libmariadb3
sudo dpkg -r --force-depends libssl1.1 <-- this removed the big list of packages in my question
sudo apt update
sudo apt upgrade
sudo apt dist-upgrade我将安装任何我需要的软件包,因为我走。
发布于 2019-02-11 11:49:16
看起来您目前拥有的大部分是Debian 8 (jessie),但是MySQL/MariaDB和python-httplib2已经更新为当前的testing (即最终将成为Debian 10,buster)。
当您最初将testing添加到sources.list中时,它可能是stretch (= Debian 9,当前的stable版本)的同义词,但就在Debian 9发布的当天,testing也提前指向了下一个版本,因此您的“次要更新”(最初的sudo apt-get update + sudo apt-get upgrade)可能至少将一些包更新到buster版本级别。
这是使用testing而不是像stretch或buster这样的发行版代码名的危险:您需要在发布日准确地更新存储库配置,否则除非非常小心,否则很容易得到计划外的、可能是部分升级。
下面的命令可能有助于识别所有不在当前stable版本级别上的包(假设它在Debian 8中有效;我不确定它在其中是否可用):
apt list --installed | grep -v /stable运行grep upgrade /var/log/dpkg.log查看最新的包升级,并检查它们的版本。查找所有意外升级到buster/testing版本的包,并将它们降级(不要删除)返回到正确的版本。
日志消息将如下所示:
<timestamp> upgrade <package name> <old version> <new version>所以你可以看到以前的版本。如果一个包的旧版本已经适合于stretch (即它是从testing安装的,而Debian 8是stable),那么将该软件包降级到stretch's当前的水平:
sudo apt-get -t=stretch <package name>或者如果您需要指定确切的版本号:
sudo apt-get install <package-name>=<package-version-number>https://unix.stackexchange.com/questions/499886
复制相似问题