A atualização do APT falha por causa da permissão negada [duplicada]

0

Ao fazer sudo apt-get upgrade , estou recebendo este erro. Por favor, alguém pode me ajudar a se livrar desse erro ...

Err:29 http://security.ubuntu.com/ubuntu xenial-security/restricted amd64 DEP-11 Metadata
  Could not open file /var/lib/apt/lists/partial/security.ubuntu.com_ubuntu_dists_xenial-security_restricted_dep11_Components-amd64.yml.gz - open (13: Permission denied)
Hit:42 http://security.ubuntu.com/ubuntu xenial-security/multiverse amd64 DEP-11 Metadata
Ign:45 http://security.ubuntu.com/ubuntu xenial-security/multiverse DEP-11 64x64 Icons
Get:49 http://in.archive.ubuntu.com/ubuntu xenial-updates/universe i386 Packages [516 kB]
Get:50 http://in.archive.ubuntu.com/ubuntu xenial-updates/universe Translation-en [220 kB]
Get:51 http://in.archive.ubuntu.com/ubuntu xenial-updates/universe amd64 DEP-11 Metadata [173 kB]
Ign:52 http://in.archive.ubuntu.com/ubuntu xenial-updates/universe DEP-11 64x64 Icons
Get:53 http://in.archive.ubuntu.com/ubuntu xenial-updates/multiverse amd64 Packages [15.8 kB]
Get:54 http://in.archive.ubuntu.com/ubuntu xenial-updates/multiverse i386 Packages [15.0 kB]
Get:55 http://in.archive.ubuntu.com/ubuntu xenial-updates/multiverse Translation-en [7,644 B]
Ign:56 http://in.archive.ubuntu.com/ubuntu xenial-updates/multiverse amd64 DEP-11 Metadata
Ign:57 http://in.archive.ubuntu.com/ubuntu xenial-updates/multiverse DEP-11 64x64 Icons
Get:58 http://in.archive.ubuntu.com/ubuntu xenial-backports/main amd64 DEP-11 Metadata [3,328 B]
Get:59 http://in.archive.ubuntu.com/ubuntu xenial-backports/universe amd64 DEP-11 Metadata [4,584 B]
Get:30 http://in.archive.ubuntu.com/ubuntu xenial-updates/main i386 Packages [611 kB]
Ign:40 http://in.archive.ubuntu.com/ubuntu xenial-updates/main DEP-11 64x64 Icons
Ign:47 http://in.archive.ubuntu.com/ubuntu xenial-updates/restricted amd64 DEP-11 Metadata
Ign:52 http://in.archive.ubuntu.com/ubuntu xenial-updates/universe DEP-11 64x64 Icons
Ign:56 http://in.archive.ubuntu.com/ubuntu xenial-updates/multiverse amd64 DEP-11 Metadata
Ign:57 http://in.archive.ubuntu.com/ubuntu xenial-updates/multiverse DEP-11 64x64 Icons
Err:40 http://in.archive.ubuntu.com/ubuntu xenial-updates/main DEP-11 64x64 Icons
  Could not open file /var/lib/apt/lists/partial/in.archive.ubuntu.com_ubuntu_dists_xenial-updates_main_dep11_icons-64x64.tar.gz - open (13: Permission denied)
Ign:47 http://in.archive.ubuntu.com/ubuntu xenial-updates/restricted amd64 DEP-11 Metadata
Ign:52 http://in.archive.ubuntu.com/ubuntu xenial-updates/universe DEP-11 64x64 Icons
Get:56 http://in.archive.ubuntu.com/ubuntu xenial-updates/multiverse amd64 DEP-11 Metadata [6,341 B]
Ign:57 http://in.archive.ubuntu.com/ubuntu xenial-updates/multiverse DEP-11 64x64 Icons
Fetched 3,600 kB in 41s (87.2 kB/s)                                            
Reading package lists... Done
E: Failed to fetch http://security.ubuntu.com/ubuntu/dists/xenial-security/restricted/dep11/Components-amd64.yml  Could not open file /var/lib/apt/lists/partial/security.ubuntu.com_ubuntu_dists_xenial-security_restricted_dep11_Components-amd64.yml.gz - open (13: Permission denied)
E: Failed to fetch http://in.archive.ubuntu.com/ubuntu/dists/xenial-updates/main/dep11/icons-64x64.tar  Could not open file /var/lib/apt/lists/partial/in.archive.ubuntu.com_ubuntu_dists_xenial-updates_main_dep11_icons-64x64.tar.gz - open (13: Permission denied)
E: Some index files failed to download. They have been ignored, or old ones used instead.   

Eu uso este passos: -

sudo -i 
rm /var/lib/apt/lists/partial/*
exit
sudo apt update   

então isso me dá o seguinte erro: -

179 packages can be upgraded. Run 'apt list --upgradable' to see them.
W: http://security.ubuntu.com/ubuntu/dists/xenial-security/restricted/binary-amd64/by-hash/SHA256/81b9f032b48cdd473075f9798b299617d9628050291cd0cd27c140f86fc21005: Automatically disabled Acquire::http::Pipeline-Depth due to incorrect response from server/proxy. (man 5 apt.conf)
W: http://in.archive.ubuntu.com/ubuntu/dists/xenial-updates/restricted/binary-amd64/by-hash/SHA256/b9e26643ccf26941d9979437df6983487fcc21a2ef80ba4a59ab4447f339b321: Automatically disabled Acquire::http::Pipeline-Depth due to incorrect response from server/proxy. (man 5 apt.conf)   

Depois disso, corro sudo apt upgrade , mas ele está me dando o seguinte aviso: -

W: http://in.archive.ubuntu.com/ubuntu/pool/main/s/systemd/systemd_229-4ubuntu21_amd64.deb: Automatically disabled Acquire::http::Pipeline-Depth due to incorrect response from server/proxy. (man 5 apt.conf)
    
por Vineet Jain 30.10.2017 / 07:43

1 resposta

4

Eu finalmente descobri o problema: -
1. excluir pacotes parciais usando

sudo -i 
rm /var/lib/apt/lists/partial/*
exit

2. então atualizando e atualizando pacotes

sudo apt update    
sudo apt upgrade  

3. pipeline broken warning foi corrigido adicionando linhas abaixo em /etc/apt/apt.conf

Acquire::http::No-Cache true;
Acquire::http::Pipeline-Depth 0;
    
por Vineet Jain 30.10.2017 / 08:56