Pessoal, estava querendo instalar o virtual box no Ubuntu 18.04 e o primeiro tutorial que vi em video acabei executando (estava com pressa)
A sequencia de comandos no vídeo foi:
sudo apt-get update && sudo apt-get dist-upgrade && sudo apt-get autoremove
sudo apt-get -y install gcc make linux-headers-$(uname -r) dkms
wget -q
https://www.virtualbox.org/download/oracle_vbox_2016.asc -O- | sudo apt-key add -
wget -q
https://www.virtualbox.org/download/oracle_vbox.asc -O- | sudo apt-key add -
sudo sh -c 'echo *deb
http://download.virtualbox.org/virtualbox/debian $(lsb_release -sc) contrib* >> /etc/apt/sources.list'
Aqui que a coisa ficou ruim.
os próximos comandos seriam:
sudo apt-get update
sudo apt-get install virtualbox-5.2
mas ao executar o sudo apt-get update ocorreu o seguinte erro:
E: Tipo '*deb' não é conhecido na linha 52 na lista de fontes /etc/apt/sources.list
Já percebi que ferrei o arquivo de lista , mas como posso resolver? O estranho é que no video do cara não ocorre erro...por isso achei q estava tranquilo usar este tutorial.
video que segui:
https://www.youtube.com/watch?v=RBwbREoaO_YEdit:
----------------------------------
percebi buscando que eu confundi o " por * e o comando deveria ser
sudo sh -c 'echo "deb
http://download.virtualbox.org/virtualbox/debian $(lsb_release -sc) contrib" >> /etc/apt/sources.list.d/virtualbox.list'
pqp , como resolver agora?
Obrigado
--------
Edit 2
cat -n /etc/apt/sources.list e visualizei o conteúdo do arquivo, como abaixo:
1 #deb cdrom:[Ubuntu 18.04 LTS _Bionic Beaver_ - Release amd64 (20180426)]/ bionic main restricted
2
3 # See
http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
4 # newer versions of the distribution.
5 deb
http://br.archive.ubuntu.com/ubuntu/ bionic main restricted
6 # deb-src
http://br.archive.ubuntu.com/ubuntu/ bionic main restricted
7
8 ## Major bug fix updates produced after the final release of the
9 ## distribution.
10 deb
http://br.archive.ubuntu.com/ubuntu/ bionic-updates main restricted
11 # deb-src
http://br.archive.ubuntu.com/ubuntu/ bionic-updates main restricted
12
13 ## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
14 ## team. Also, please note that software in universe WILL NOT receive any
15 ## review or updates from the Ubuntu security team.
16 deb
http://br.archive.ubuntu.com/ubuntu/ bionic universe
17 # deb-src
http://br.archive.ubuntu.com/ubuntu/ bionic universe
18 deb
http://br.archive.ubuntu.com/ubuntu/ bionic-updates universe
19 # deb-src
http://br.archive.ubuntu.com/ubuntu/ bionic-updates universe
20
21 ## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
22 ## team, and may not be under a free licence. Please satisfy yourself as to
23 ## your rights to use the software. Also, please note that software in
24 ## multiverse WILL NOT receive any review or updates from the Ubuntu
25 ## security team.
26 deb
http://br.archive.ubuntu.com/ubuntu/ bionic multiverse
27 # deb-src
http://br.archive.ubuntu.com/ubuntu/ bionic multiverse
28 deb
http://br.archive.ubuntu.com/ubuntu/ bionic-updates multiverse
29 # deb-src
http://br.archive.ubuntu.com/ubuntu/ bionic-updates multiverse
30
31 ## N.B. software from this repository may not have been tested as
32 ## extensively as that contained in the main release, although it includes
33 ## newer versions of some applications which may provide useful features.
34 ## Also, please note that software in backports WILL NOT receive any review
35 ## or updates from the Ubuntu security team.
36 deb
http://br.archive.ubuntu.com/ubuntu/ bionic-backports main restricted universe multiverse
37 # deb-src
http://br.archive.ubuntu.com/ubuntu/ bionic-backports main restricted universe multiverse
38
39 ## Uncomment the following two lines to add software from Canonical's
40 ## 'partner' repository.
41 ## This software is not part of Ubuntu, but is offered by Canonical and the
42 ## respective vendors as a service to Ubuntu users.
43 # deb
http://archive.canonical.com/ubuntu bionic partner
44 # deb-src
http://archive.canonical.com/ubuntu bionic partner
45
46 deb
http://security.ubuntu.com/ubuntu bionic-security main restricted
47 # deb-src
http://security.ubuntu.com/ubuntu bionic-security main restricted
48 deb
http://security.ubuntu.com/ubuntu bionic-security universe
49 # deb-src
http://security.ubuntu.com/ubuntu bionic-security universe
50 deb
http://security.ubuntu.com/ubuntu bionic-security multiverse
51 # deb-src
http://security.ubuntu.com/ubuntu bionic-security multiverse
52 *deb
http://download.virtualbox.org/virtualbox/debian bionic contrib*
53 deb
http://download.virtualbox.org/virtualbox/debian bionic contrib
sudo gedit /etc/apt/sources.list para editar o arquivo e a linha 52 eu troquei o * por "
Será isso o suficiente?