склонный - получают ошибки броска обновления

Я пытаюсь работать sudo apt-get update && apt-get upgrade -y но это бросает серию ошибок. Я плохо знаком со средой Linux.

Я использую Ubuntu 18.04 Бионический Бобр

sudo apt-get update && apt-get upgrade -y
Ign:1 http://dl.google.com/linux/chrome/deb stable InRelease
Hit:2 http://ppa.launchpad.net/persepolis/ppa/ubuntu bionic InRelease  
Hit:3 http://dl.google.com/linux/chrome/deb stable Release                
Err:5 http://archive.canonical.com/ubuntu bionic InRelease             
502  Connection timed out [IP: 2001:67c:1360:8c01::16 80]
Err:6 http://security.ubuntu.com/ubuntu bionic-security InRelease   
502  Connection timed out [IP: 2001:67c:1562::16 80]
Err:7 http://in.archive.ubuntu.com/ubuntu bionic InRelease
502  Connection timed out [IP: 2001:67c:1360:8001::21 80]
Err:8 http://in.archive.ubuntu.com/ubuntu bionic-updates InRelease
502  Connection timed out [IP: 2001:67c:1360:8001::21 80]
Err:9 http://security.ubuntu.com/ubuntu artful-security InRelease
502  Connection timed out [IP: 2001:67c:1562::16 80]
Err:10 http://in.archive.ubuntu.com/ubuntu artful InRelease
502  Connection timed out [IP: 2001:67c:1360:8001::21 80]
Err:11 http://in.archive.ubuntu.com/ubuntu artful-updates InRelease
502  Connection timed out [IP: 2001:67c:1360:8001::21 80]
Err:12 http://in.archive.ubuntu.com/ubuntu bionic-backports InRelease
502  Connection timed out [IP: 2001:67c:1360:8001::21 80]
Reading package lists... Done
W: Failed to fetch 
http://in.archive.ubuntu.com/ubuntu/dists/bionic/InRelease  502  
Connection timed out [IP: 2001:67c:1360:8001::21 80]
W: Failed to fetch http://in.archive.ubuntu.com/ubuntu/dists/bionic- 
updates/InRelease  502  Connection timed out [IP: 
2001:67c:1360:8001::21 80]
W: Failed to fetch 
http://in.archive.ubuntu.com/ubuntu/dists/artful/InRelease  502  
Connection timed out [IP: 2001:67c:1360:8001::21 80]
W: Failed to fetch http://in.archive.ubuntu.com/ubuntu/dists/artful- 
updates/InRelease  502  Connection timed out [IP: 
2001:67c:1360:8001::21 80]
W: Failed to fetch http://in.archive.ubuntu.com/ubuntu/dists/bionic- 
backports/InRelease  502  Connection timed out [IP: 
2001:67c:1360:8001::21 80]
W: Failed to fetch 
http://archive.canonical.com/ubuntu/dists/bionic/InRelease  502  
Connection timed out [IP: 2001:67c:1360:8c01::16 80]
W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/bionic- 
security/InRelease  502  Connection timed out [IP: 2001:67c:1562::16 
80]
W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/artful- 
security/InRelease  502  Connection timed out [IP: 2001:67c:1562::16 
80]
W: Some index files failed to download. They have been ignored, or old 
ones used instead.
E: Could not open lock file /var/lib/dpkg/lock - open (13: Permission 
denied)
E: Unable to lock the administration directory (/var/lib/dpkg/), are 
you root?

Спасибо

1
задан 29 June 2018 в 12:02

2 ответа

Ваша командная строка содержит одно возникновение sudo но также и &&. В этом случае, sudo только относится к бывшей команде, не части после &&. Добавить sudo к последней команде, также.

sudo apt-get update && sudo apt-get upgrade -y

Однако существует по крайней мере еще одна проблема:

502  Connection timed out [IP: 2001:67c:1360:8001::21 80]

что означает, что необходимо проверить сетевое соединение.

Обычно Вы должны команды выполнения вручную один за другим (т.е. избежать &&, -y и т.д.) для диагностирования проблем.

2
ответ дан 7 December 2019 в 15:17

Попробуйте эти команды:

sudo -i
apt-get clean
cd /var/lib/apt
mv lists lists.old
mkdir -p lists/partial
apt-get clean
apt-get update
-1
ответ дан 7 December 2019 в 15:17

Другие вопросы по тегам:

Похожие вопросы: