ubuntu 10.04 安装virtualbox 4.0

本文详细记录了在Ubuntu系统上安装VirtualBox的过程,包括解决依赖问题、添加官方源、安装签名密钥等步骤。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

以前安装过virtualbox,

现在再安装一遍。

直接装,源里头没有:

 

root@zhangbin-laptop:/home/zhangbin# apt-get install virtualbox

Reading package lists... Done

Building dependency tree       

Reading state information... Done

Package virtualbox is not available, but is referred to by another package.

This may mean that the package is missing, has been obsoleted, or

is only available from another source

E: Package virtualbox has no installation candidate

 

http://www.virtualbox.org/wiki/Linux_Downloads

这里有官方安装说法:

 

Debian-based Linux distributions

Note: VirtualBox has been moved from non-free to contrib with 4.0, so please adjust your repository settings.

Add one of the following lines according to your distribution to your /etc/apt/sources.list:

deb http://download.virtualbox.org/virtualbox/debian maverick contrib
deb http://download.virtualbox.org/virtualbox/debian lucid contrib
deb http://download.virtualbox.org/virtualbox/debian karmic contrib
deb http://download.virtualbox.org/virtualbox/debian jaunty contrib
deb http://download.virtualbox.org/virtualbox/debian intrepid contrib
deb http://download.virtualbox.org/virtualbox/debian hardy contrib
deb http://download.virtualbox.org/virtualbox/debian squeeze contrib
deb http://download.virtualbox.org/virtualbox/debian lenny contrib
deb http://download.virtualbox.org/virtualbox/debian etch contrib

The Oracle public key for apt-secure can be downloaded here. You can add this key with

sudo apt-key add oracle_vbox.asc

or combine downloading and registering:

wget -q http://download.virtualbox.org/virtualbox/debian/oracle_vbox.asc -O- | sudo apt-key add -

The key fingerprint is

7B0F AB3A 13B9 0743 5925  D9C9 5442 2A4B 98AB 5139
Oracle Corporation (VirtualBox archive signing key) <info@virtualbox.org>

(As of VirtualBox 3.2, the signing key was changed. The old Sun public key for apt-secure can be downloadedhere.)

To install VirtualBox, do

sudo apt-get update
sudo apt-get install virtualbox-4.0

Replace virtualbox-4.0 by

  • virtualbox-3.2 to install VirtualBox 3.2.12
  • virtualbox-3.1 to install VirtualBox 3.1.8
  • virtualbox-3.0 to install VirtualBox 3.0.14
  • virtualbox-2.2 to install VirtualBox 2.2.4
  • virtualbox-2.1 to install VirtualBox 2.1.4
  • virtualbox-2.0 to install VirtualBox 2.0.12
  • virtualbox to install VirtualBox 1.6.6

Note: Ubuntu/Debian users might want to install the dkms package to ensure that the VirtualBox host kernel modules (vboxdrvvboxnetflt and vboxnetadp) are properly updated if the linux kernel version changes during the next apt-get upgrade. For Debian it is available in Lenny backports and in the normal repository for Squeeze and later. The dkms package can be installed through the Synaptic Package manager or through the following command:

sudo apt-get install dkms

What to do when experiencing The following signatures were invalid: BADSIG ... when refreshing the packages from the repository?

# sudo -s -H
# apt-get clean
# rm /var/lib/apt/lists/*
# rm /var/lib/apt/lists/partial/*
# apt-get clean
# apt-get update
========================================================
更新了sources.list之后,
apt-get update 之后。
root@zhangbin-laptop:/home/zhangbin# apt-get install virtualbox
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Note, selecting virtualbox-4.0 instead of virtualbox
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-4.0: Depends: libqtcore4 (>= 4:4.7.0~beta1) but 4:4.6.2-0ubuntu5.1 is to be installed
                  Depends: libqtgui4 (>= 4:4.7.0~beta1) but 4:4.6.2-0ubuntu5.1 is to be installed
                  Depends: libssl0.9.8 (>= 0.9.8m-1) but 0.9.8k-7ubuntu8.6 is to be installed
E: Broken packages
看上去依赖的是qt4 的库。
原因是应该只保留lucide这个发行版,这个是ubuntu 10.04。
这会就可以了。
root@zhangbin-laptop:/home/zhangbin# apt-get install virtualbox
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Note, selecting virtualbox-4.0 instead of virtualbox
The following extra packages will be installed:
  dkms libmng1 libqt4-network libqt4-opengl libqtcore4 libqtgui4 libsdl-ttf2.0-0 virtualbox-4.0
Suggested packages:
  qt4-qtconfig
The following NEW packages will be installed:
  dkms libmng1 libqt4-network libqt4-opengl libqtcore4 libqtgui4 libsdl-ttf2.0-0 virtualbox-4.0
0 upgraded, 8 newly installed, 0 to remove and 0 not upgraded.
Need to get 65.1MB of archives.
After this operation, 133MB of additional disk space will be used.
Do you want to continue [Y/n]? y
WARNING: The following packages cannot be authenticated!
  virtualbox-4.0
Install these packages without verification [y/N]? y
Do you want to continue [Y/n]? y
WARNING: The following packages cannot be authenticated!
  virtualbox-4.0
Install these packages without verification [y/N]? y
Get:1 http://download.virtualbox.org/virtualbox/debian/ lucid/contrib virtualbox-4.0 4.0.4-70112~Ubuntu~lucid [58.4MB]
0% [1 virtualbox-4.0 336kB/58.4MB 0%]^C                       

官网上的virtualbox下不回来。
先不下了。
安装key
root@zhangbin-laptop:/media/WinHome/ffmpeg# sudo apt-key add oracle_vbox.asc
gpg: can't open `oracle_vbox.asc': No such file or directory
root@zhangbin-laptop:/media/WinHome/ffmpeg# sudo apt-key add oracle_vbox.asc
gpg: can't open `oracle_vbox.asc': No such file or directory
看来是路径没搞对。
下回来这个asc文件,然后
root@zhangbin-laptop:/home/zhangbin/下载# ls
fcitx-3.6.3      google-chrome-stable_current_i386.deb  linuxqq_v1.0.2_i386.tar.gz
fcitx-3.6.3.tar  linuxqq_v1.0.2_i386                    oracle_vbox.asc
root@zhangbin-laptop:/home/zhangbin/下载# sudo apt-key add oracle_vbox.asc
OK
======
在官网用浏览器直接下,速度还挺快的。真是不知道为啥终端不行。
然后成功安装拉。

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

等风来不如迎风去

你的鼓励是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值