无法从 22.04 升级到 22.10?

无法从 22.04 升级到 22.10?

我目前正在尝试从 22.04 升级到 22.10(只是因为我想这样做),但出于某种原因,我有 20 个软件包无论我怎么尝试,它们都不会更新,这阻碍了我升级。我尝试了它所说的所有方法,包括更新它们、删除它们等,但没有任何效果。有什么建议吗?

当我运行时sudo apt update,我得到了这个结果:

    Get:1 http://security.ubuntu.com/ubuntu jammy-security InRelease [110 kB]
    Hit:2 http://us.archive.ubuntu.com/ubuntu jammy InRelease                      
    Hit:3 https://download.docker.com/linux/ubuntu jammy InRelease                 
    Get:4 http://us.archive.ubuntu.com/ubuntu jammy-updates InRelease [114 kB]     
    Hit:5 https://cloud.r-project.org/bin/linux/ubuntu focal-cran40/ InRelease     
    Get:6 http://us.archive.ubuntu.com/ubuntu jammy-backports InRelease [99.8 kB]  
    Hit:7 https://ppa.launchpadcontent.net/deadsnakes/ppa/ubuntu jammy InRelease   
    Get:8 http://security.ubuntu.com/ubuntu jammy-security/main amd64 DEP-11 Metadata [41.4 kB]
     Get:9 http://us.archive.ubuntu.com/ubuntu jammy-updates/main amd64 DEP-11 Metadata [102 kB]
    Get:10 http://security.ubuntu.com/ubuntu jammy-security/universe amd64 DEP-11 Metadata [13.3 kB]
    Get:11 http://us.archive.ubuntu.com/ubuntu jammy-updates/universe amd64 DEP-11 Metadata [265 kB]
    Get:12 http://us.archive.ubuntu.com/ubuntu jammy-updates/multiverse amd64 DEP-11 Metadata [940 B]
    Get:13 http://us.archive.ubuntu.com/ubuntu jammy-backports/universe amd64 DEP-11 Metadata [12.5 kB]
    Fetched 759 kB in 1s (540 kB/s)                                               
    Reading package lists... Done
    Building dependency tree... Done
    Reading state information... Done
    20 packages can be upgraded. Run 'apt list --upgradable' to see them.
    W: https://cloud.r-project.org/bin/linux/ubuntu/focal-cran40/InRelease: Key is stored in legacy trusted.gpg keyring (/etc/apt/trusted.gpg), see the DEPRECATION section in apt-key(8) for details.

当我运行时sudo apt-get upgrade,我得到了这个:

Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Calculating upgrade... Done
The following packages have been kept back:
  libinput-bin libinput10 python3-software-properties r-base r-base-core
  r-base-dev r-cran-class r-cran-cluster r-cran-foreign r-cran-lattice
  r-cran-mass r-cran-matrix r-cran-mgcv r-cran-nlme r-cran-nnet r-cran-rpart
  r-recommended software-properties-common software-properties-gtk
  ubuntu-advantage-tools
0 upgraded, 0 newly installed, 0 to remove and 20 not upgraded.

当我运行时sudo do-release-upgrade,我得到了这个:

Checking for a new Ubuntu release
Please install all available updates for your release before upgrading.

任何建议都很好。

谢谢!

编辑:运行后sudo apt install packagename我得到了这个:

    Reading package lists... Done
    Building dependency tree... Done
    Reading state information... Done
    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:
     r-base-core : Depends: libicu66 (>= 66.1-1~) but it is not installable
     E: Unable to correct problems, you have held broken packages.

答案1

看一下并看看是否可以找到问题所在。

  1. 你正在运行 22.04(“jammy”)系统

  2. 有资料显示https://cloud.r-project.org/bin/linux/ubuntu focal-cran40/

看到了吗?“focal”而不是“jammy”

您正在运行的 R 软件包适用于错误的 Ubuntu 版本,并且来自非 Ubuntu 源。真是双重打击。这就是它们被“阻止”的原因。这就是您看到“不可能的情况”段落的原因。

  1. 保存您的数据。
  2. 从错误版本源卸载所有 R 包。(https://cloud.r-project.org/bin/linux/ubuntu focal-cran40/
  3. 禁用或者删除该源。
  4. 运行sudo apt update,因为您刚刚更改了来源。
  5. 运行sudo apt clean以从本地缓存中删除那些错误版本的包。
  6. 重新安装 R 包。如果没有错误版本的源,您的系统将从兼容的 Ubuntu 存储库安装它们。

这应该可以解决你的大部分问题。

相关内容