Instalar o gcc no bash do Ubuntu no Windows 10

Joao Tec

Power Member
Boas, estou a tentar instalar o gcc e está-me a dar o seguinte erro:

Reading package lists... Done
Building dependency tree
Reading state information... Done
The following package was automatically installed and is no longer required:
libfreetype6
Use 'sudo apt autoremove' to remove it.
The following additional packages will be installed:
binutils binutils-common binutils-x86-64-linux-gnu cpp cpp-7 gcc-7 gcc-7-base libasan4 libatomic1 libbinutils
libc-dev-bin libc6-dev libcc1-0 libcilkrts5 libgcc-7-dev libgomp1 libisl19 libitm1 liblsan0 libmpc3 libmpx2
libquadmath0 libtsan0 libubsan0 linux-libc-dev manpages-dev
Suggested packages:
binutils-doc cpp-doc gcc-7-locales gcc-multilib make autoconf automake libtool flex bison gdb gcc-doc gcc-7-multilib
gcc-7-doc libgcc1-dbg libgomp1-dbg libitm1-dbg libatomic1-dbg libasan4-dbg liblsan0-dbg libtsan0-dbg libubsan0-dbg
libcilkrts5-dbg libmpx2-dbg libquadmath0-dbg glibc-doc
The following NEW packages will be installed:
binutils binutils-common binutils-x86-64-linux-gnu cpp cpp-7 gcc gcc-7 gcc-7-base libasan4 libatomic1 libbinutils
libc-dev-bin libc6-dev libcc1-0 libcilkrts5 libgcc-7-dev libgomp1 libisl19 libitm1 liblsan0 libmpc3 libmpx2
libquadmath0 libtsan0 libubsan0 linux-libc-dev manpages-dev
0 upgraded, 27 newly installed, 0 to remove and 0 not upgraded.
Need to get 987 kB/26.9 MB of archives.
After this operation, 115 MB of additional disk space will be used.
Do you want to continue? [Y/n] Y
Ign:1 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 linux-libc-dev amd64 4.15.0-29.31
Err:1 http://security.ubuntu.com/ubuntu bionic-updates/main amd64 linux-libc-dev amd64 4.15.0-29.31
404 Not Found [IP: 2001:67c:1560:8001::14 80]
E: Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/l/linux/linux-libc-dev_4.15.0-29.31_amd64.deb 404 Not Found [IP: 2001:67c:1560:8001::14 80]
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?

Alguém sabe como contornar o erro?
Já fiz o mesmo numa máquina virtual e dá o mesmo erro.
Obrigado!
 
@slblxs obrigado. Ainda não consegui instalar. Não percebi como apagar a sources list e colar essa que deu.

Abres o terminal, apagas o que está lá e colas esta;

Segue um video, para ser mais fácil. ;)


Colas o que coloquei, os repositórios em PT.

Depois é só fazeres no terminal;

#apt-get update && apt-get upgrade

E depois de actualizares, instalas o GCC seguindo os passos que está no link.
 
Back
Topo