在系统从ubuntu 20.04 LTS升级到ubuntu 22.04.1 LTS后,执行“`sudo apt 您所在的位置:网站首页 ubuntu升级到22 在系统从ubuntu 20.04 LTS升级到ubuntu 22.04.1 LTS后,执行“`sudo apt

在系统从ubuntu 20.04 LTS升级到ubuntu 22.04.1 LTS后,执行“`sudo apt

2023-04-12 16:51| 来源: 网络整理| 查看: 265

经过长时间的搜索和尝试,我做到了:

sudo apt --fix-broken install sudo rm /var/lib/dpkg/lock sudo rm /var/lib/dpkg/lock-frontend sudo rm /var/lib/apt/lists/lock sudo rm /var/cache/apt/archives/lock sudo dpkg --configure -a

然后,洞穴(!)这会将firefox从已安装的包列表中删除,因此在此命令之后,在安装firefox之前,您就不能在计算机上使用firefox了--所以我这样做了--但是我有第二台计算机,在这台计算机上没有firefox时,我可以在那里搜索。我无法安装铬浏览器或其他浏览器,因为apt不工作!因此,只有当您有第二台计算机或至少您的移动冲浪指令时,才运行此命令!

sudo dpkg --force depends -P firefox

我在https://forums.mozillazine.org/viewtopic.php?f=38&t=3097766中找到了一个提示

我的解决办法是:

# Add Mozilla Team PPA sudo add-apt-repository ppa:mozillateam/ppa # Set PPA priority sudo gedit /etc/apt/preferences.d/mozillateamppa # The command creates and opens empty config file in Gedit text editor. # When it opens, add the lines below and save it: Package: firefox* Pin: release o=LP-PPA-mozillateam Pin-Priority: 501

保存并关闭该文件。

在那之后,我终于可以:

sudo apt --fix-broken install # and then: sudo apt update && sudo apt upgrade

然后,所有的apt或snap命令再次完美无缺地工作。

注意:

现在,我遇到

sudo apt install chromium-browser Reading package lists... Done Building dependency tree... Done Reading state information... Done The following NEW packages will be installed: chromium-browser 0 upgraded, 1 newly installed, 0 to remove and 4 not upgraded. Need to get 0 B/48,4 kB of archives. After this operation, 164 kB of additional disk space will be used. Preconfiguring packages ... (Reading database ... 313313 files and directories currently installed.) Preparing to unpack .../chromium-browser_1%3a85.0.4183.83-0ubuntu2_amd64.deb ... => Installing the chromium snap ==> Checking connectivity with the snap store ==> Installing the chromium snap error: cannot perform the following tasks: - Run configure hook of "chromium" snap if present (run hook "configure": cannot perform operation: mount --rbind /var/log / tmp/snap.rootfs_Gg42mE//var/log: Permission denied) dpkg: error processing archive /var/cache/apt/archives/chromium-browser_1%3a85.0.4183.83-0ubuntu2_amd64.deb (--unpack): new chromium-browser package pre-installation script subprocess returned error exit status 1 Errors were encountered while processing: /var/cache/apt/archives/chromium-browser_1%3a85.0.4183.83-0ubuntu2_amd64.deb E: Sub-process /usr/bin/dpkg returned an error code (1)

我试过:

sudo add-apt-repository ppa:xtradeb/apps sudo gedit /etc/apt/preferences.d/xtradebppa # content: Package: chromium* Pin: release o=LP-PPA-xtradeb Pin-Priority: 501

但这没什么用。



【本文地址】

公司简介

联系我们

今日新闻

    推荐新闻

    专题文章
      CopyRight 2018-2019 实验室设备网 版权所有