libgles 问题

libgles 问题

我尝试升级并收到以下错误:

$ sudo apt-get dist-upgrade
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:
 libgles-dev : Depends: libgles1 (= 1.3.0-7~kisak~b) but it is not installed
 qtbase5-dev : Depends: libgles2-mesa-dev but it is not installed or
                        libgles2-dev but it is not installable
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 additional packages will be installed:
  libegl1-mesa-dev libgles2-mesa-dev
The following NEW packages will be installed:
  libegl1-mesa-dev libgles2-mesa-dev
0 upgraded, 2 newly installed, 0 to remove and 10 not upgraded.
3 not fully installed or removed.
Need to get 0 B/65.5 kB of archives.
After this operation, 876 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
(Reading database ... 354525 files and directories currently installed.)
Preparing to unpack .../libegl1-mesa-dev_20.0.8-0ubuntu1~18.04.1_amd64.deb ...
Unpacking libegl1-mesa-dev:amd64 (20.0.8-0ubuntu1~18.04.1) ...
dpkg: error processing archive /var/cache/apt/archives/libegl1-mesa-dev_20.0.8-0ubuntu1~18.04.1_amd64.deb (--unpack):
 trying to overwrite '/usr/include/EGL/egl.h', which is also in package libegl-dev:amd64 1.3.0-7~kisak~b
Preparing to unpack .../libgles2-mesa-dev_20.0.8-0ubuntu1~18.04.1_amd64.deb ...
Unpacking libgles2-mesa-dev:amd64 (20.0.8-0ubuntu1~18.04.1) ...
dpkg: error processing archive /var/cache/apt/archives/libgles2-mesa-dev_20.0.8-0ubuntu1~18.04.1_amd64.deb (--unpack):
 trying to overwrite '/usr/include/GLES2/gl2.h', which is also in package libgles-dev:amd64 1.3.0-7~kisak~b
Errors were encountered while processing:
 /var/cache/apt/archives/libegl1-mesa-dev_20.0.8-0ubuntu1~18.04.1_amd64.deb
 /var/cache/apt/archives/libgles2-mesa-dev_20.0.8-0ubuntu1~18.04.1_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

更多信息:

 $ sudo dpkg --configure -a
    dpkg: dependency problems prevent configuration of qtbase5-dev:amd64:
     qtbase5-dev:amd64 depends on libgles2-mesa-dev | libgles2-dev; however:
      Package libgles2-mesa-dev:amd64 is not installed.
      Package libgles2-dev is not installed.
    
    dpkg: error processing package qtbase5-dev:amd64 (--configure):
     dependency problems - leaving unconfigured
    dpkg: dependency problems prevent configuration of libqt5opengl5-dev:amd64:
     libqt5opengl5-dev:amd64 depends on qtbase5-dev (= 5.9.5+dfsg-0ubuntu2.5); however:
      Package qtbase5-dev:amd64 is not configured yet.
    
    dpkg: error processing package libqt5opengl5-dev:amd64 (--configure):
     dependency problems - leaving unconfigured
    dpkg: dependency problems prevent configuration of qt5-default:amd64:
     qt5-default:amd64 depends on qtbase5-dev; however:
      Package qtbase5-dev:amd64 is not configured yet.
    
    dpkg: error processing package qt5-default:amd64 (--configure):
     dependency problems - leaving unconfigured
    Errors were encountered while processing:
     qtbase5-dev:amd64
     libqt5opengl5-dev:amd64
     qt5-default:amd64

我无法删除--清除这些包。

我尝试了论坛上找到的几种建议,但没有成功。在列出这些建议之前,我希望有人能认识到问题所在并提出解决方案。谢谢。

答案1

以下内容让我动心了。欢迎评论。

$ sudo dpkg -i --force-overwrite /var/cache/apt/archives/libgles2-mesa-dev_20.0.8-0ubuntu1~18.04.1_amd64.deb
    
$ sudo dpkg --configure -a

相关内容