无法在 ubuntu24.04LTS 中安装 virtualbox,因为它尚未针对此版本的 ubuntu 发布

无法在 ubuntu24.04LTS 中安装 virtualbox,因为它尚未针对此版本的 ubuntu 发布

我想在 Ubuntu24.04 LTS 上安装 virtualbox,但我没有找到适用于 Ubuntu 24.04 的 virtualbox 软件包,于是我下载了适用于 jammy 的 virtualbox,并尝试安装它,得到了这个输出

arman@salar:~/Downloads$ sudo apt install ./virtualbox-7.0_7.0.16-162802~Ubuntu~jammy_amd64.deb 
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Note, selecting 'virtualbox-7.0' instead of './virtualbox-7.0_7.0.16-162802~Ubuntu~jammy_amd64.deb'
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:
 virtualbox-7.0 : Depends: libvpx7 (>= 1.10.0) but it is not installable
                  Recommends: libsdl-ttf2.0-0 but it is not going to be installed
                  Recommends: gcc but it is not going to be installed
                  Recommends: make or
                              build-essential but it is not going to be installed or
                              dpkg-dev but it is not going to be installed
                  Recommends: binutils but it is not going to be installed
E: Unable to correct problems, you have held broken packages

有什么办法可以绕过这个错误,或者我们必须等待 virtualbox 官方网站发布适合 ubuntu24.04TS 的软件包?

答案1

解决方法是安装libvpx7如下:

  1. 从以下位置下载文件http://archive.ubuntu.com/ubuntu/pool/main/libv/libvpx/libvpx7_1.12.0-1ubuntu2_amd64.deb
  2. 通过运行命令来安装sudo apt install ./virtualbox-7.0_7.0.16-162802~Ubuntu~jammy_amd64.deb

(可选)您还可以安装libsdl-ttf2.0-0和:sudo apt install libsdl-ttf2.0-0

相关内容