N: Skipping acquire of configured file [duplicate]

Edit:

sudo nano /etc/apt/sources.list.d/virtualbox.list

and change:

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

for

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

Or open terminal an execute the following command:

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

Or run this bash script to install virtualbox and its dependencies from Oracle repository (tested in Ubuntu 18.04/20.04):

chmod +x VboxInstall.sh && ./VboxInstall.sh

#!/bin/bash
# Install Virtualbox from Oracle Repository
echo "deb [arch=amd64] http://download.virtualbox.org/virtualbox/debian $(lsb_release -sc) contrib" | sudo tee /etc/apt/sources.list.d/virtualbox.list
sudo su -c 'wget -q -O- https://www.virtualbox.org/download/oracle_vbox.asc | apt-key add -'
sudo su -c 'wget -q -O- http://download.virtualbox.org/virtualbox/debian/oracle_vbox_2016.asc | apt-key add -'
sudo apt-get update
sudo apt-get -y install linux-headers-$(uname -r) build-essential gcc make perl dkms bridge-utils
sudo apt-get -y install virtualbox-6.1
sudo dpkg --configure -a && sudo apt-get -f -y install
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
sudo VBoxManage extpack install Oracle_VM_VirtualBox_Extension_Pack-$VBOX_VER.vbox-extpack
sudo usermod -a -G vboxusers $USER
sudo update-grub
sudo /sbin/vboxconfig

the following bash script, if it detects previous versions, removes them and then proceeds with the new installation. If not detected, install virtualbox.

It is recommended to backup the VMs and virtualbox configurations before executing it

#!/bin/bash
vboxversion=$(dpkg -l | grep -P 'virtualbox-\d+\.\d+' | awk '{print $2}')

function vboxinstall(){
 echo "Vbox not detected. Installing..."
 echo "deb [arch=amd64] http://download.virtualbox.org/virtualbox/debian $(lsb_release -sc) contrib" | sudo tee /etc/apt/sources.list.d/virtualbox.list
 sudo su -c 'wget -q -O- https://www.virtualbox.org/download/oracle_vbox.asc | sudo apt-key add -'
 sudo su -c 'wget -q -O- http://download.virtualbox.org/virtualbox/debian/oracle_vbox_2016.asc | apt-key add -'
 sudo apt-get update
 sudo apt-get -y install linux-headers-$(uname -r) build-essential gcc make perl dkms bridge-utils
 sudo apt-get -y install virtualbox-6.1
 sudo dpkg --configure -a && sudo apt-get -f -y install
 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
 sudo VBoxManage extpack install Oracle_VM_VirtualBox_Extension_Pack-$VBOX_VER.vbox-extpack
 sudo usermod -a -G vboxusers $USER
 sudo update-grub
 sudo /sbin/vboxconfig
 echo Done
}

function vboxpurge(){
 echo "Vbox has been detected. Removing..."
 sudo vboxmanage list runningvms | sed -r 's/.*\{(.*)\}/\1/' | sudo xargs -L1 -I {} VBoxManage controlvm {} savestate
 sudo VBoxManage extpack uninstall "Oracle VM VirtualBox Extension Pack"
 sudo pkill vboxwebsrv virtualbox Vbox* &> /dev/null
 sudo systemctl stop vboxweb-service.service &> /dev/null
 sudo apt-get -y autoremove --purge $(echo $vboxversion)
 sudo rm -rf /etc/vbox /opt/VirtualBox /usr/lib/virtualbox ~/.config/VirtualBox /etc/apt/sources.list.d/virtualbox.list &> /dev/null
 echo Done 
}

if [ "$vboxversion" ]; then
  vboxpurge
  sleep 5
  vboxinstall
 else
  vboxinstall
fi

Source: Virtualbox kernel service is not running


You should try with a https deb source:

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