apt upgrade 提示“有几个软件包无法下载”

这个提示出来,我运行apt-get update提示命令不存在~

加–fix-missing的话,是运行 apt upgrade --fix-missing 么?

apt-get不存在?我认为不太可能……再运行一次试试?

See apt-get(8):

apt-get [-asqdyfmubV] [-o=config_string] [-c=config_file] [-t=target_release] [-a=architecture] {update | upgrade | dselect-upgrade | dist-upgrade | install pkg [{=pkg_version_number | /target_release}]… | remove pkg… | purge pkg… | source pkg [{=pkg_version_number | /target_release}]… | build-dep pkg [{=pkg_version_number | /target_release}]… | download pkg [{=pkg_version_number | /target_release}]… | check | clean | autoclean | autoremove | {-v | --version} | {-h | --help}}

应该使用命令apt --fix-missing upgrade

不过,我建议不要使用这个选项……

-m, --ignore-missing, --fix-missing
Ignore missing packages; if packages cannot be retrieved or fail the integrity check after retrieval (corrupted package files), hold back those packages and handle the result. Use of this option together with -f may produce an error in some situations. If a package is selected for installation (particularly if it is mentioned on the command line) and it could not be downloaded then it will be silently held back. Configuration Item: APT::Get::Fix-Missing.

其实,简单地再次运行命令apt upgrade就可以,由于下载的软件包没有被安装,所以它们不会被删除,重新运行命令只会下载前一次未能成功下载的软件包。

peter@peter-pc:~$ sudo apt upgrade

正在读取软件包列表… 完成
正在分析软件包的依赖关系树
正在读取状态信息… 完成
正在计算更新… 完成
下列软件包将被升级:
apt apt-utils bind9-host firefox-esr firefox-esr-l10n-ar
firefox-esr-l10n-ast firefox-esr-l10n-be firefox-esr-l10n-bg
firefox-esr-l10n-bn firefox-esr-l10n-bs firefox-esr-l10n-ca
firefox-esr-l10n-cs firefox-esr-l10n-cy firefox-esr-l10n-da
firefox-esr-l10n-de firefox-esr-l10n-el firefox-esr-l10n-en-gb
firefox-esr-l10n-eo firefox-esr-l10n-es-ar firefox-esr-l10n-es-cl
firefox-esr-l10n-es-es firefox-esr-l10n-es-mx firefox-esr-l10n-et
firefox-esr-l10n-eu firefox-esr-l10n-fa firefox-esr-l10n-fi
firefox-esr-l10n-fr firefox-esr-l10n-ga-ie firefox-esr-l10n-gl
firefox-esr-l10n-gu-in firefox-esr-l10n-he firefox-esr-l10n-hi-in
firefox-esr-l10n-hr firefox-esr-l10n-hu firefox-esr-l10n-id
firefox-esr-l10n-is firefox-esr-l10n-it firefox-esr-l10n-ja
firefox-esr-l10n-kk firefox-esr-l10n-km firefox-esr-l10n-kn
firefox-esr-l10n-ko firefox-esr-l10n-lt firefox-esr-l10n-lv
firefox-esr-l10n-mk firefox-esr-l10n-mr firefox-esr-l10n-nb-no
firefox-esr-l10n-ne-np firefox-esr-l10n-nl firefox-esr-l10n-nn-no
firefox-esr-l10n-pa-in firefox-esr-l10n-pl firefox-esr-l10n-pt-br
firefox-esr-l10n-pt-pt firefox-esr-l10n-ro firefox-esr-l10n-ru
firefox-esr-l10n-si firefox-esr-l10n-sk firefox-esr-l10n-sl
firefox-esr-l10n-sq firefox-esr-l10n-sr firefox-esr-l10n-sv-se
firefox-esr-l10n-ta firefox-esr-l10n-te firefox-esr-l10n-th
firefox-esr-l10n-tr firefox-esr-l10n-uk firefox-esr-l10n-vi
firefox-esr-l10n-zh-cn firefox-esr-l10n-zh-tw gir1.2-gst-plugins-base-1.0
gstreamer1.0-alsa gstreamer1.0-gl gstreamer1.0-plugins-bad
gstreamer1.0-plugins-base gstreamer1.0-plugins-good
gstreamer1.0-pulseaudio gstreamer1.0-x libapt-inst2.0 libapt-pkg5.0
libbind9-161 libcurl3-gnutls libdns-export1104 libdns1104
libgstreamer-gl1.0-0 libgstreamer-plugins-bad1.0-0
libgstreamer-plugins-base1.0-0 libisc-export1100 libisc1100 libisccc161
libisccfg163 libjs-underscore libldb1 liblwres161 libopenjp2-7
libsmbclient libssl1.1 libwbclient0 openjdk-11-jre openjdk-11-jre-headless
openssl samba-libs wpasupplicant xserver-common xserver-xorg-core
xserver-xorg-legacy
升级了 106 个软件包,新安装了 0 个软件包,要卸载 0 个软件包,有 0 个软件包未被升级。
需要下载 37.2 MB/175 MB 的归档。
解压缩后会消耗 400 kB 的额外空间。
您希望继续执行吗? [Y/n]

这么多语言包,有点不合理~

似乎要求升级firefox全部的语言包(其实问题在于这些语言包都是要求升级,换言之,由于某种原因,它们已经全部被安装了)?locale的输出是什么?

peter@peter-pc:~$ locale
LANG=zh_CN.UTF-8
LANGUAGE=
LC_CTYPE=“zh_CN.UTF-8”
LC_NUMERIC=zh_CN.UTF-8
LC_TIME=zh_CN.UTF-8
LC_COLLATE=“zh_CN.UTF-8”
LC_MONETARY=zh_CN.UTF-8
LC_MESSAGES=“zh_CN.UTF-8”
LC_PAPER=zh_CN.UTF-8
LC_NAME=zh_CN.UTF-8
LC_ADDRESS=zh_CN.UTF-8
LC_TELEPHONE=zh_CN.UTF-8
LC_MEASUREMENT=zh_CN.UTF-8
LC_IDENTIFICATION=zh_CN.UTF-8
LC_ALL=

LANGUAGE环境变量没有被设置,所以task-desktop要求安装所有的语言支持。建议运行dpkg-reconfigure locales重新配置语言环境,或者检查系统设置>区域设置>语言中的语言优先级。

我试了一下,不知道是不是bug,改了后重启没用:



在开始-系统设置-区域设置里点击“添加语言”按钮后没任何反应~

火狐浏览器语言包很多是因为用的是debian live 10.9版本镜像来安装的系统,debian live版本因为为了实现各种语言支持都有的效果 所以就把很多程序语言包都囊括进去了。类似的现象还有libreoffice等等,所以就会在安全更新的时候会提示需要更新很多语言包。

语言包很多是debian live ISO制作团队这么做的,就算你区域语言只有简体中文中国这一项,语言包都会存在。不影响使用的。更新就更新。因为debian live就类似于ubuntu live 所以肯定会囊括各种国家语言包在里面。这是正常现象。这样在试用时就可以加载对应的语言文件界面

1 个赞

我确实是用live安装的~

那就不折腾了,先upgrade再说~