首页 > 系统相关 >使用dpkg在ubuntu上安装软件包遇到依赖包的问题

使用dpkg在ubuntu上安装软件包遇到依赖包的问题

时间:2024-03-25 16:47:16浏览次数:25  
标签:... amd64 ubuntu 0ubuntu2.1 installed 5.12 7.0 软件包 dpkg

问题

在ubuntu上使用apt-get安装软件包,系统会自动安装依赖的软件包,但是使用dpkg在ubuntu上安装软件包时不会,有时会遇到下面的错误:

pengdl@pengdl-HP:~/Soft$ sudo dpkg -i virtualbox-7.0_7.0.14-161095~Ubuntu~focal_amd64.deb
[sudo] password for pengdl:
Selecting previously unselected package virtualbox-7.0.
(Reading database ... 278532 files and directories currently installed.)
Preparing to unpack virtualbox-7.0_7.0.14-161095~Ubuntu~focal_amd64.deb ...
Unpacking virtualbox-7.0 (7.0.14-161095~Ubuntu~focal) ...
dpkg: dependency problems prevent configuration of virtualbox-7.0:
 virtualbox-7.0 depends on libqt5help5 (>= 5.9.0); however:
  Package libqt5help5 is not installed.
 virtualbox-7.0 depends on libqt5opengl5 (>= 5.0.2); however:
  Package libqt5opengl5 is not installed.
 virtualbox-7.0 depends on libqt5x11extras5 (>= 5.6.0); however:
  Package libqt5x11extras5 is not installed.
 virtualbox-7.0 depends on libqt5xml5 (>= 5.0.2); however:
  Package libqt5xml5 is not installed.

dpkg: error processing package virtualbox-7.0 (--install):
 dependency problems - leaving unconfigured
Processing triggers for systemd (245.4-4ubuntu3.23) ...
Processing triggers for gnome-menus (3.36.0-1ubuntu1) ...
Processing triggers for desktop-file-utils (0.24-1ubuntu3) ...
Processing triggers for mime-support (3.64ubuntu1) ...
Processing triggers for hicolor-icon-theme (0.17-2) ...
Processing triggers for shared-mime-info (1.15-1) ...
Errors were encountered while processing:
 virtualbox-7.0

解决

  • 查看当前的依赖关系问题:
$ sudo apt install --fix-missing
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:
 virtualbox-7.0 : Depends: libqt5help5 (>= 5.9.0) but it is not installed
                  Depends: libqt5opengl5 (>= 5.0.2) but it is not installed
                  Depends: libqt5x11extras5 (>= 5.6.0) but it is not installed
                  Depends: libqt5xml5 (>= 5.0.2) but it is not installed
                  Recommends: libsdl-ttf2.0-0 but it is not installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
  • 解决依赖关系问题
$ sudo apt install --fix-broken
pengdl@pengdl-HP:~/Soft$ sudo apt install --fix-broken
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:
  gir1.2-goa-1.0 libfwupdplugin1 libpkgconf3 libxmlb1
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
  libqt5help5 libqt5opengl5 libqt5sql5 libqt5sql5-sqlite libqt5x11extras5 libqt5xml5
The following NEW packages will be installed:
  libqt5help5 libqt5opengl5 libqt5sql5 libqt5sql5-sqlite libqt5x11extras5 libqt5xml5
0 upgraded, 6 newly installed, 0 to remove and 12 not upgraded.
1 not fully installed or removed.
Need to get 554 kB of archives.
After this operation, 2,408 kB of additional disk space will be used.
Do you want to continue? [Y/n]
Get:1 http://mirrors.aliyun.com/ubuntu focal-updates/universe amd64 libqt5sql5 amd64 5.12.8+dfsg-0ubuntu2.1 [121 kB]
Get:2 http://mirrors.aliyun.com/ubuntu focal/universe amd64 libqt5help5 amd64 5.12.8-0ubuntu1 [134 kB]
Get:3 http://mirrors.aliyun.com/ubuntu focal-updates/universe amd64 libqt5opengl5 amd64 5.12.8+dfsg-0ubuntu2.1 [136 kB]
Get:4 http://mirrors.aliyun.com/ubuntu focal/universe amd64 libqt5x11extras5 amd64 5.12.8-0ubuntu1 [10.3 kB]
Get:5 http://mirrors.aliyun.com/ubuntu focal-updates/universe amd64 libqt5xml5 amd64 5.12.8+dfsg-0ubuntu2.1 [105 kB]
Get:6 http://mirrors.aliyun.com/ubuntu focal-updates/universe amd64 libqt5sql5-sqlite amd64 5.12.8+dfsg-0ubuntu2.1 [47.6 kB]
Fetched 554 kB in 1s (385 kB/s)
Selecting previously unselected package libqt5sql5:amd64.
(Reading database ... 279268 files and directories currently installed.)
Preparing to unpack .../0-libqt5sql5_5.12.8+dfsg-0ubuntu2.1_amd64.deb ...
Unpacking libqt5sql5:amd64 (5.12.8+dfsg-0ubuntu2.1) ...
Selecting previously unselected package libqt5help5:amd64.
Preparing to unpack .../1-libqt5help5_5.12.8-0ubuntu1_amd64.deb ...
Unpacking libqt5help5:amd64 (5.12.8-0ubuntu1) ...
Selecting previously unselected package libqt5opengl5:amd64.
Preparing to unpack .../2-libqt5opengl5_5.12.8+dfsg-0ubuntu2.1_amd64.deb ...
Unpacking libqt5opengl5:amd64 (5.12.8+dfsg-0ubuntu2.1) ...
Selecting previously unselected package libqt5x11extras5:amd64.
Preparing to unpack .../3-libqt5x11extras5_5.12.8-0ubuntu1_amd64.deb ...
Unpacking libqt5x11extras5:amd64 (5.12.8-0ubuntu1) ...
Selecting previously unselected package libqt5xml5:amd64.
Preparing to unpack .../4-libqt5xml5_5.12.8+dfsg-0ubuntu2.1_amd64.deb ...
Unpacking libqt5xml5:amd64 (5.12.8+dfsg-0ubuntu2.1) ...
Selecting previously unselected package libqt5sql5-sqlite:amd64.
Preparing to unpack .../5-libqt5sql5-sqlite_5.12.8+dfsg-0ubuntu2.1_amd64.deb ...
Unpacking libqt5sql5-sqlite:amd64 (5.12.8+dfsg-0ubuntu2.1) ...
Setting up libqt5x11extras5:amd64 (5.12.8-0ubuntu1) ...
Setting up libqt5sql5:amd64 (5.12.8+dfsg-0ubuntu2.1) ...
Setting up libqt5xml5:amd64 (5.12.8+dfsg-0ubuntu2.1) ...
Setting up libqt5opengl5:amd64 (5.12.8+dfsg-0ubuntu2.1) ...
Setting up libqt5sql5-sqlite:amd64 (5.12.8+dfsg-0ubuntu2.1) ...
Setting up libqt5help5:amd64 (5.12.8-0ubuntu1) ...
Setting up virtualbox-7.0 (7.0.14-161095~Ubuntu~focal) ...
Adding group `vboxusers' (GID 138) ...
Done.
Processing triggers for libc-bin (2.31-0ubuntu9.14) ...

完。

标签:...,amd64,ubuntu,0ubuntu2.1,installed,5.12,7.0,软件包,dpkg
From: https://www.cnblogs.com/pengdonglin137/p/18094737

相关文章

  • Linux:腾讯云轻量应用服务器搭建Ubuntu图形界面并配置远程连接
    一、安装桌面环境远程连接Ubuntu服务器。 运行以下命令,切换为root用户。 sudosuroot安装x-windows应用程序。 apt-getinstall-yx-window-system-core安装GNOME的显示管理器gdm3。 apt-getinstall-ygdm3安装Ubunut的桌面。 apt-getinstall-yubuntu-deskto......
  • Ubuntu根盘扩容
    参考https://blog.csdn.net/weixin_51480590/article/details/127767660虚拟机关机之后,扩展磁盘增加容量fdisk-lDisk/dev/sda:40GiB,42949672960bytes,83886080sectorsDiskmodel:VMwareVirtualSUnits:sectorsof1*512=512bytesSectorsize(logical/ph......
  • wsl docker 和 ubuntu 冲突问题
    https://blog.csdn.net/weixin_44825912/article/details/136565219问题如下:wsl安装成功,但打开时出现多行报错无法使用。PSC:\WINDOWS\system32>wsl<3>WSL(8)ERROR:CreateProcessParseCommon:754:getpwuid(0)failed2Processingfstabwithmount-afailed.<3>......
  • finalshell 登录ubuntu ,创建文件之后修改文件 提示权限不足
    在FinalShell中登录Ubuntu系统时,如果你创建文件后尝试修改文件提示权限不足,通常是因为你当前使用的用户账户没有对该文件或目录具有足够的写入权限。解决这个问题有以下几种方法:使用sudo权限:如果你需要对某个系统级别的文件进行操作,可能需要以超级用户(root)权限执行命令。在Fi......
  • 重返ubuntu世界
    一直对“重返”两个字充满了情怀感,因为会想起小时候看的一本龙珠同人的标题,它就唤作《重回龙珠世界》。最近这五年基本都是在MacOS下工作和学习的,也习惯用MacOS。就到最近一周,我正打算再买一台自用的MacPro的时候,我突然想到其实可以把自己一直吃灰的旧笔记重装成ubuntu系统,还能省......
  • Ubuntu下执行可执行二进制文件报文件找不到的错误:No such file or directory
      这个问题之前有碰到,但是没有在意去解决,最近使用Docker部署的时候又出现这个问题,找了一下资料,有了一个解决办法。  比如我们有二进制文件,正常来说它应该是这个样子的,可以执行并输出:    但是现在它报错,找不到文件了:    那么我们一步步来解决  第一步:查看文件......
  • Ubuntu下安装Python虚拟环境
    安装和配置安装包管理神器pipsudoaptinstallpython-pip升级pipsudopipinstall--upgradepip安装virtualenv,virtualenvwrappersudopipinstallvirtualenvsudopipinstallvirtualenvwrapper配置virtualenvwrapper#默认的virtualenvwrapper安装在/u......
  • Ubuntu 22.04.4 Zabbix6.4部署安装
     简介Zabbix是一款企业级的开源监控解决方案,主要用于分布式系统和网络设备的监控。它提供了基于Web界面的集中管理和监控功能,能够实时监控服务器的各项性能指标,如CPU负载、内存使用情况、磁盘空间占用,以及网络流量等,并且支持自动发现网络中的服务器与设备。 安装步骤 ......
  • 在idea中连接ubuntu 16中的docker
    在idea中连接ubuntu16中的docker前提ubuntu安装了docker1.安装docker插件,在file->settings中2.进入Build,Execution,Deployment->Docker通过加号添加这个时候其实不会图片中连接成功的标志,因为还没有配置docker服务,注意我虚拟机的ip为192.168.93.1313.配置dock......
  • ubuntu设置时间显示为24小时制
    对ubuntu默认的时间显示格式不太满意,查阅了相关资料进行修改为24小时制度,特此记录和分享给需要设置的网友查看当前的timezoneroot@jumpserver:~#timedatectlLocaltime:Sat2024-03-2312:45:53UTCUniversaltime:Sat2024-03-2312:45:53UT......