当我尝试安装/升级任何应用程序时出现错误

当我尝试安装/升级任何应用程序时出现错误

当我尝试安装一个包时,例如firefox使用:

sudo apt install firefox

我被要求输入密码。输入密码后,我得到:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
 libglvnd-dev : Depends: libgles-dev (>= 1.3.0-1) but it is not going to be installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).

我输入:

sudo apt --fix-broken 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:
  libglvnd-core-dev libx11-xcb-dev libxcb-dri2-0-dev libxcb-dri3-dev
  libxcb-glx0-dev libxdamage-dev libxshmfence-dev x11proto-damage-dev
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
  libgles-dev
The following NEW packages will be installed:
  libgles-dev
0 upgraded, 1 newly installed, 0 to remove and 707 not upgraded.
4 not fully installed or removed.
Need to get 0 B/50.4 kB of archives.
After this operation, 718 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
(Reading database ... 354422 files and directories currently installed.)
Preparing to unpack .../libgles-dev_1.3.2-1~kisak~b_amd64.deb ...
Unpacking libgles-dev:amd64 (1.3.2-1~kisak~b) ...
dpkg: error processing archive /var/cache/apt/archives/libgles-dev_1.3.2-1~kisak~b_amd64.deb (--unpack):
 trying to overwrite '/usr/include/GLES2/gl2.h', which is also in package libgles2-mesa-dev:amd64 20.0.8-0ubuntu1~18.04.1
Errors were encountered while processing:
 /var/cache/apt/archives/libgles-dev_1.3.2-1~kisak~b_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

当我输入:

sudo apt-cache policy libgles-dev libgles2-mesa-dev

输出显示:

libgles-dev:
  Installed: (none) 
  Candidate: 1.3.2-1~kisak~b 
  Version table:
     1.3.2-1~kisak~b 500
        500 ppa.launchpad.net/kisak/kisak-mesa/ubuntu bionic/main amd64 Packages 
libgles2-mesa-dev:
  Installed: 20.0.8-0ubuntu1~18.04.1
  Candidate: 20.2.1~kisak1~b 
  Version table:
     20.2.1~kisak1~b 500
        500 ppa.launchpad.net/kisak/kisak-mesa/ubuntu bionic/main amd64 Packages *** 
     20.0.8-0ubuntu1~18.04.1 500
        500 in.archive.ubuntu.com/ubuntu bionic-updates/main amd64 Packages
        100 /var/lib/dpkg/status 19.2.8-0ubuntu0~18.04.2 500
        500 security.ubuntu.com/ubuntu bionic-security/main amd64 Packages
     18.0.0~rc5-1ubuntu1 500 500 in.archive.ubuntu.com/ubuntu bionic/main amd64 Packages

我应该怎么办?

答案1

  1. 打开软件和更新并转到其他软件
  2. 附近必须有一个复选框http://ppa.launchpad.net/kisak/kisak-mesa/ubuntu bionic/main。请将其关闭。

现在尝试安装firefox并检查它是否正常工作。

相关内容