Форум русскоязычного сообщества Ubuntu


Считаете, что Ubuntu недостаточно дружелюбна к новичкам?
Помогите создать новое Руководство для новичков!

Автор Тема: Не получается установить gcc  (Прочитано 1361 раз)

0 Пользователей и 1 Гость просматривают эту тему.

Оффлайн annaifel

  • Автор темы
  • Новичок
  • *
  • Сообщений: 1
    • Просмотр профиля
Не получается установить gcc
« : 08 Сентября 2020, 11:10:38 »
Всем доброго времени суток.
Столкнулась с проблемой, что для работы необходимо использовать Linux, в моём случае Windows Subsystem, Ubuntu 20.04 LTS, а на него загрузить Си, чтобы писать всякие нужные программки. Но вот незадача, при вводе команды sudo apt install gcc выпадает куча ошибок, и что с этим делать я не понимаю, так как Linux до этого вообще ни в каком виде не использовала, поэтому буду премного благодарна за помощь.
Далее следует текст, который отображается после исполнения команды.

root@ilina-pc:/home/annaifel# sudo apt install gcc
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
  binutils binutils-common binutils-x86-64-linux-gnu cpp cpp-9 gcc-9 gcc-9-base libasan5 libatomic1 libbinutils
  libc-dev-bin libc6-dev libcc1-0 libcrypt-dev libctf-nobfd0 libctf0 libgcc-9-dev libgomp1 libisl22 libitm1 liblsan0
  libmpc3 libquadmath0 libtsan0 libubsan1 linux-libc-dev manpages-dev
Suggested packages:
  binutils-doc cpp-doc gcc-9-locales gcc-multilib make autoconf automake libtool flex bison gdb gcc-doc gcc-9-multilib
  gcc-9-doc glibc-doc
The following NEW packages will be installed:
  binutils binutils-common binutils-x86-64-linux-gnu cpp cpp-9 gcc gcc-9 gcc-9-base libasan5 libatomic1 libbinutils
  libc-dev-bin libc6-dev libcc1-0 libcrypt-dev libctf-nobfd0 libctf0 libgcc-9-dev libgomp1 libisl22 libitm1 liblsan0
  libmpc3 libquadmath0 libtsan0 libubsan1 linux-libc-dev manpages-dev
0 upgraded, 28 newly installed, 0 to remove and 0 not upgraded.
Need to get 28.5 MB of archives.
After this operation, 123 MB of additional disk space will be used.
Do you want to continue? [Y/n] Y
Err:1 http://archive.ubuntu.com/ubuntu focal/main amd64 binutils-common amd64 2.34-6ubuntu1
  Could not connect to archive.ubuntu.com:80 (2001:67c:1562::18). - connect (111: Connection refused) Could not connect to archive.ubuntu.com:80 (2001:67c:1562::15). - connect (111: Connection refused) Could not connect to archive.ubuntu.com:80 (2001:67c:1360:8001::24). - connect (111: Connection refused) Could not connect to archive.ubuntu.com:80 (2001:67c:1360:8001::23). - connect (111: Connection refused) Could not connect to archive.ubuntu.com:80 (91.189.88.152). - connect (111: Connection refused) Could not connect to archive.ubuntu.com:80 (91.189.88.142). - connect (111: Connection refused)
Err:2 http://archive.ubuntu.com/ubuntu focal/main amd64 libbinutils amd64 2.34-6ubuntu1
  Unable to connect to archive.ubuntu.com:http:
Err:3 http://archive.ubuntu.com/ubuntu focal/main amd64 libctf-nobfd0 amd64 2.34-6ubuntu1
  Unable to connect to archive.ubuntu.com:http:
Err:4 http://archive.ubuntu.com/ubuntu focal/main amd64 libctf0 amd64 2.34-6ubuntu1
  Unable to connect to archive.ubuntu.com:http:
Err:5 http://archive.ubuntu.com/ubuntu focal/main amd64 binutils-x86-64-linux-gnu amd64 2.34-6ubuntu1
  Unable to connect to archive.ubuntu.com:http:
Err:6 http://archive.ubuntu.com/ubuntu focal/main amd64 binutils amd64 2.34-6ubuntu1
  Unable to connect to archive.ubuntu.com:http:
Err:7 http://archive.ubuntu.com/ubuntu focal/main amd64 gcc-9-base amd64 9.3.0-10ubuntu2
  Unable to connect to archive.ubuntu.com:http:
Err:8 http://archive.ubuntu.com/ubuntu focal/main amd64 libisl22 amd64 0.22.1-1
  Unable to connect to archive.ubuntu.com:http:
Err:9 http://archive.ubuntu.com/ubuntu focal/main amd64 libmpc3 amd64 1.1.0-1
  Unable to connect to archive.ubuntu.com:http:
Err:10 http://archive.ubuntu.com/ubuntu focal/main amd64 cpp-9 amd64 9.3.0-10ubuntu2
  Unable to connect to archive.ubuntu.com:http:
Err:11 http://archive.ubuntu.com/ubuntu focal/main amd64 cpp amd64 4:9.3.0-1ubuntu2
  Unable to connect to archive.ubuntu.com:http:
Err:12 http://archive.ubuntu.com/ubuntu focal/main amd64 libcc1-0 amd64 10-20200411-0ubuntu1
  Unable to connect to archive.ubuntu.com:http:
Err:13 http://archive.ubuntu.com/ubuntu focal/main amd64 libgomp1 amd64 10-20200411-0ubuntu1
  Unable to connect to archive.ubuntu.com:http:
Err:14 http://archive.ubuntu.com/ubuntu focal/main amd64 libitm1 amd64 10-20200411-0ubuntu1
  Unable to connect to archive.ubuntu.com:http:
Err:15 http://archive.ubuntu.com/ubuntu focal/main amd64 libatomic1 amd64 10-20200411-0ubuntu1
  Unable to connect to archive.ubuntu.com:http:
Err:16 http://archive.ubuntu.com/ubuntu focal/main amd64 libasan5 amd64 9.3.0-10ubuntu2
  Unable to connect to archive.ubuntu.com:http:
Err:17 http://archive.ubuntu.com/ubuntu focal/main amd64 liblsan0 amd64 10-20200411-0ubuntu1
  Unable to connect to archive.ubuntu.com:http:
Err:18 http://archive.ubuntu.com/ubuntu focal/main amd64 libtsan0 amd64 10-20200411-0ubuntu1
  Unable to connect to archive.ubuntu.com:http:
Err:19 http://archive.ubuntu.com/ubuntu focal/main amd64 libubsan1 amd64 10-20200411-0ubuntu1
  Unable to connect to archive.ubuntu.com:http:
Err:20 http://archive.ubuntu.com/ubuntu focal/main amd64 libquadmath0 amd64 10-20200411-0ubuntu1
  Unable to connect to archive.ubuntu.com:http:
Err:21 http://archive.ubuntu.com/ubuntu focal/main amd64 libgcc-9-dev amd64 9.3.0-10ubuntu2
  Unable to connect to archive.ubuntu.com:http:
Err:22 http://archive.ubuntu.com/ubuntu focal/main amd64 gcc-9 amd64 9.3.0-10ubuntu2
  Unable to connect to archive.ubuntu.com:http:
Err:23 http://archive.ubuntu.com/ubuntu focal/main amd64 gcc amd64 4:9.3.0-1ubuntu2
  Unable to connect to archive.ubuntu.com:http:
Err:24 http://archive.ubuntu.com/ubuntu focal/main amd64 libc-dev-bin amd64 2.31-0ubuntu9
  Unable to connect to archive.ubuntu.com:http:
Ign:25 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 linux-libc-dev amd64 5.4.0-42.46
Err:26 http://archive.ubuntu.com/ubuntu focal/main amd64 libcrypt-dev amd64 1:4.4.10-10ubuntu4
  Unable to connect to archive.ubuntu.com:http:
Err:27 http://archive.ubuntu.com/ubuntu focal/main amd64 libc6-dev amd64 2.31-0ubuntu9
  Unable to connect to archive.ubuntu.com:http:
Err:28 http://archive.ubuntu.com/ubuntu focal/main amd64 manpages-dev all 5.05-1
  Unable to connect to archive.ubuntu.com:http:
Err:25 http://security.ubuntu.com/ubuntu focal-updates/main amd64 linux-libc-dev amd64 5.4.0-42.46
  Unable to connect to archive.ubuntu.com:http:
E: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/b/binutils/binutils-common_2.34-6ubuntu1_amd64.deb  Could not connect to archive.ubuntu.com:80 (2001:67c:1562::18). - connect (111: Connection refused) Could not connect to archive.ubuntu.com:80 (2001:67c:1562::15). - connect (111: Connection refused) Could not connect to archive.ubuntu.com:80 (2001:67c:1360:8001::24). - connect (111: Connection refused) Could not connect to archive.ubuntu.com:80 (2001:67c:1360:8001::23). - connect (111: Connection refused) Could not connect to archive.ubuntu.com:80 (91.189.88.152). - connect (111: Connection refused) Could not connect to archive.ubuntu.com:80 (91.189.88.142). - connect (111: Connection refused)
E: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/b/binutils/libbinutils_2.34-6ubuntu1_amd64.deb  Unable to connect to archive.ubuntu.com:http:
E: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/b/binutils/libctf-nobfd0_2.34-6ubuntu1_amd64.deb  Unable to connect to archive.ubuntu.com:http:
E: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/b/binutils/libctf0_2.34-6ubuntu1_amd64.deb  Unable to connect to archive.ubuntu.com:http:
E: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/b/binutils/binutils-x86-64-linux-gnu_2.34-6ubuntu1_amd64.deb  Unable to connect to archive.ubuntu.com:http:
E: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/b/binutils/binutils_2.34-6ubuntu1_amd64.deb  Unable to connect to archive.ubuntu.com:http:
E: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/g/gcc-9/gcc-9-base_9.3.0-10ubuntu2_amd64.deb  Unable to connect to archive.ubuntu.com:http:
E: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/i/isl/libisl22_0.22.1-1_amd64.deb  Unable to connect to archive.ubuntu.com:http:
E: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/m/mpclib3/libmpc3_1.1.0-1_amd64.deb  Unable to connect to archive.ubuntu.com:http:
E: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/g/gcc-9/cpp-9_9.3.0-10ubuntu2_amd64.deb  Unable to connect to archive.ubuntu.com:http:
E: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/g/gcc-defaults/cpp_9.3.0-1ubuntu2_amd64.deb  Unable to connect to archive.ubuntu.com:http:
E: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/g/gcc-10/libcc1-0_10-20200411-0ubuntu1_amd64.deb  Unable to connect to archive.ubuntu.com:http:
E: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/g/gcc-10/libgomp1_10-20200411-0ubuntu1_amd64.deb  Unable to connect to archive.ubuntu.com:http:
E: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/g/gcc-10/libitm1_10-20200411-0ubuntu1_amd64.deb  Unable to connect to archive.ubuntu.com:http:
E: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/g/gcc-10/libatomic1_10-20200411-0ubuntu1_amd64.deb  Unable to connect to archive.ubuntu.com:http:
E: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/g/gcc-9/libasan5_9.3.0-10ubuntu2_amd64.deb  Unable to connect to archive.ubuntu.com:http:
E: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/g/gcc-10/liblsan0_10-20200411-0ubuntu1_amd64.deb  Unable to connect to archive.ubuntu.com:http:
E: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/g/gcc-10/libtsan0_10-20200411-0ubuntu1_amd64.deb  Unable to connect to archive.ubuntu.com:http:
E: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/g/gcc-10/libubsan1_10-20200411-0ubuntu1_amd64.deb  Unable to connect to archive.ubuntu.com:http:
E: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/g/gcc-10/libquadmath0_10-20200411-0ubuntu1_amd64.deb  Unable to connect to archive.ubuntu.com:http:
E: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/g/gcc-9/libgcc-9-dev_9.3.0-10ubuntu2_amd64.deb  Unable to connect to archive.ubuntu.com:http:
E: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/g/gcc-9/gcc-9_9.3.0-10ubuntu2_amd64.deb  Unable to connect to archive.ubuntu.com:http:
E: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/g/gcc-defaults/gcc_9.3.0-1ubuntu2_amd64.deb  Unable to connect to archive.ubuntu.com:http:
E: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/g/glibc/libc-dev-bin_2.31-0ubuntu9_amd64.deb  Unable to connect to archive.ubuntu.com:http:
E: Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/l/linux/linux-libc-dev_5.4.0-42.46_amd64.deb  Unable to connect to archive.ubuntu.com:http:
E: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/libx/libxcrypt/libcrypt-dev_4.4.10-10ubuntu4_amd64.deb  Unable to connect to archive.ubuntu.com:http:
E: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/g/glibc/libc6-dev_2.31-0ubuntu9_amd64.deb  Unable to connect to archive.ubuntu.com:http:
E: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/m/manpages/manpages-dev_5.05-1_all.deb  Unable to connect to archive.ubuntu.com:http:
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?

Оффлайн andytux

  • Заслуженный пользователь
  • Старожил
  • *
  • Сообщений: 7993
    • Просмотр профиля
Re: Не получается установить gcc
« Ответ #1 : 08 Сентября 2020, 11:26:08 »
Цитировать
в моём случае Windows Subsystem
Хоть здесь и есть слово Ubuntu, формально это  не входит в тематику форума.
Конкретно надо смотреть, как все настроено именно в WSL. Пару раз ей пользовался, но давно. С тех пор там многое изменилось. Конкретнее не подскажу.
Судя по ошибкам, не может получить доступ к репозитариям. Либо они не настроены в конфиге. Либо вообще нет выхода в интернет.

 

Страница сгенерирована за 0.021 секунд. Запросов: 21.