72

I installed Ubuntu 18.04 and then while installing Virtualbox i get the 'i386' error message after I did:

$ sudo apt-get update
Get:1 http://nl.archive.ubuntu.com/ubuntu bionic InRelease [242 kB]
Hit:2 http://security.ubuntu.com/ubuntu bionic-security InRelease                                                                
Hit:3 http://ppa.launchpad.net/danielrichter2007/grub-customizer/ubuntu bionic InRelease                                         
Hit:4 http://nl.archive.ubuntu.com/ubuntu bionic-updates InRelease
Hit:5 http://nl.archive.ubuntu.com/ubuntu bionic-backports InRelease
Get:6 http://download.virtualbox.org/virtualbox/debian bionic InRelease [4429 B]
Get:7 http://download.virtualbox.org/virtualbox/debian bionic/contrib amd64 Packages [1426 B]
Fetched 248 kB in 1s (209 kB/s)     
Reading package lists... Done
N: Skipping acquire of configured file 'contrib/binary-i386/Packages' as repository 'http://download.virtualbox.org/virtualbox/debian bionic InRelease' doesn't support architecture 'i386'

I found several answers on Askubuntu for the 'i386' message but I don't know how to apply this to my situation

3 Answers 3

134

First, note this is just a note (N:), not an error (E:) and not even a warning (W:). Second, note the repository for which this note appears. In this case, that is http://download.virtualbox.org/virtualbox/debian. Locate that repository in your sources:

grep -F 'http://download.virtualbox.org/virtualbox/debian' /etc/apt/sources.list /etc/apt/sources.list.d/*.list

This might show that the file is in, say, /etc/apt/sources.list.d/virtualbox.list. Then edit that file:

sudoedit /etc/apt/sources.list.d/virtualbox.list

and change the repository:

deb https://download.virtualbox.org/virtualbox/debian bionic contrib

to specifically be for amd64 only:

deb [arch=amd64] https://download.virtualbox.org/virtualbox/debian bionic contrib

Or open a terminal and execute the following command:

echo "deb [arch=$(dpkg --print-architecture)] https://download.virtualbox.org/virtualbox/debian $(lsb_release -sc) contrib" | sudo tee /etc/apt/sources.list.d/virtualbox.list

Specifically for Virtualbox, you can run this bash script to install virtualbox and its dependencies from Oracle repository (tested in Ubuntu 18.04/20.04/22.04-unconfirmed):

sudo chmod +x VboxInstall.sh && sudo ./VboxInstall.sh
#!/bin/bash
# Oracle Repository
# Download and install .asc
wget -O- https://www.virtualbox.org/download/oracle_vbox_2016.asc | gpg --dearmor | tee /usr/share/keyrings/virtualbox.gpg &> /dev/null
# add repo
echo deb [arch=amd64 signed-by=/usr/share/keyrings/virtualbox.gpg] http://download.virtualbox.org/virtualbox/debian $(lsb_release -sc) contrib | tee /etc/apt/sources.list.d/virtualbox.list/virtualbox.list
apt update
# install vbox
apt -y install linux-headers-$(uname -r) build-essential gcc make perl dkms bridge-utils
apt -y install virtualbox-6.1
dpkg --configure -a && apt-get -f -y install
# install Extension Pack
export VBOX_VER=`VBoxManage --version | awk -Fr '{print $1}'`
wget -c http://download.virtualbox.org/virtualbox/$VBOX_VER/Oracle_VM_VirtualBox_Extension_Pack-$VBOX_VER.vbox-extpack
VBoxManage extpack install Oracle_VM_VirtualBox_Extension_Pack-$VBOX_VER.vbox-extpack
# configure
usermod -a -G vboxusers $USER
update-grub
/sbin/vboxconfig
echo "Done. Reboot"
# check service after reboot
systemctl status vboxdrv

Source: Virtualbox kernel service is not running

5
  • Hello Thomas, problem solved, I succesfully installed Virualbox now, Thanks
    – Newbie
    May 1, 2018 at 12:22
  • This really helped me resolve my VirtualBox installation issues, THANK YOU!!!!
    – Jackspace
    Aug 8, 2019 at 1:05
  • you are welcome. I'm glad to hear that
    – acgbox
    Aug 8, 2019 at 19:54
  • 1
    COOL! After upgrade to virtualbox 6.1 (on my 18.04 LTS) the VMs were gone. To get them back I opened VirtualBox (i.e. the Virtualbox Manager), clicked on "Add" and navigated to the *.vbox-File. The next machines I added via the menu (Machine -> Add). Now all VMs are back. Then downloaded and installed extension pack 6.1.6. Then, in the settings under "Display", deselected 3D-acceleration (not compatible with the VBoxVGA Graphics Controller). Finally, installed the guest additions (as recommended by Oracle). In Windows 10 (guest) this worked only after a reboot. Now all is well :-))
    – Stefan
    May 15, 2020 at 11:24
  • 1
    The script is absolute fire! Thank you a lot!!!
    – KDX2
    Oct 25, 2020 at 15:01
10

You should try with a https deb source:

deb [arch=amd64] https://download.virtualbox.org/virtualbox/debian bionic contrib
7

I wanted to add a comment to secretAgent regarding this but I don't have enough reputation for that.

We need not use https for apt packages for the reasons listed on this site: https://whydoesaptnotusehttps.com/

Also, incase your virtualbox source is in /etc/apt/sources.list, ajcg's answer can be modified to:

sudo nano /etc/apt/sources.list

Edit the line

deb http://download.virtualbox.org/virtualbox/debian bionic contrib

to

deb [arch=amd64] http://download.virtualbox.org/virtualbox/debian bionic contrib

Or you could just fire up your terminal and type

echo "deb [arch=amd64] http://download.virtualbox.org/virtualbox/debian $(lsb_release -sc) contrib" | sudo tee /etc/apt/sources.list
3
  • Well, yeah, we don't need to use HTTPS with apt, but at this point why bother? If the repository supports HTTPS, I would use it.
    – YtvwlD
    May 6, 2020 at 14:34
  • Harsh Kumar Bhartiya you missed my https point Mar 2, 2021 at 10:57
  • WARNING!! last command in above solution will overwrite echo /etc/apt/sources.list. So take it's backup or don't fire the command. Aug 9, 2021 at 0:51

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .