Pacotes do Ubuntu não são atualizados

2

Eu recebo esta saída:

7 packages can be updated.
7 updates are security updates.

Last login: Tue Apr 19 10:04:51 2016 from 10.0.0.199

sempre que me conecto ao meu servidor. e ainda vejo esses pacotes não atualizados! E eu sou raiz ( sudo su ).

Quando eu sudo apt-get update recebo isto:

myserver@YHserver:~$ apt-get update
E: Could not open lock file /var/lib/apt/lists/lock - open (13: Permission denie                                                                                                                                                             d)
E: Unable to lock directory /var/lib/apt/lists/
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?

Hit http://il.archive.ubuntu.com wily InRelease
Hit http://il.archive.ubuntu.com wily-updates InRelease
Hit http://il.archive.ubuntu.com wily-backports InRelease
Hit http://il.archive.ubuntu.com wily/main Sources
Hit http://il.archive.ubuntu.com wily/restricted Sources
Hit http://il.archive.ubuntu.com wily/universe Sources
Hit http://il.archive.ubuntu.com wily/multiverse Sources
Hit http://il.archive.ubuntu.com wily/main amd64 Packages
Hit http://il.archive.ubuntu.com wily/restricted amd64 Packages
Hit http://il.archive.ubuntu.com wily/universe amd64 Packages
Hit http://il.archive.ubuntu.com wily/multiverse amd64 Packages
Hit http://il.archive.ubuntu.com wily/main i386 Packages
Hit http://il.archive.ubuntu.com wily/restricted i386 Packages
Hit http://il.archive.ubuntu.com wily/universe i386 Packages
Hit http://il.archive.ubuntu.com wily/multiverse i386 Packages
Hit http://il.archive.ubuntu.com wily/main Translation-en
Hit http://il.archive.ubuntu.com wily/multiverse Translation-en
Hit http://il.archive.ubuntu.com wily/restricted Translation-en
Hit http://il.archive.ubuntu.com wily/universe Translation-en
Hit http://il.archive.ubuntu.com wily-updates/main Sources
Hit http://il.archive.ubuntu.com wily-updates/restricted Sources
Hit http://il.archive.ubuntu.com wily-updates/universe Sources
Hit http://il.archive.ubuntu.com wily-updates/multiverse Sources
Hit http://il.archive.ubuntu.com wily-updates/main amd64 Packages
Hit http://il.archive.ubuntu.com wily-updates/restricted amd64 Packages
Hit http://il.archive.ubuntu.com wily-updates/universe amd64 Packages
Hit http://il.archive.ubuntu.com wily-updates/multiverse amd64 Packages
Hit http://il.archive.ubuntu.com wily-updates/main i386 Packages
Hit http://il.archive.ubuntu.com wily-updates/restricted i386 Packages
Hit http://il.archive.ubuntu.com wily-updates/universe i386 Packages
Hit http://il.archive.ubuntu.com wily-updates/multiverse i386 Packages
Hit http://il.archive.ubuntu.com wily-updates/main Translation-en
Hit http://il.archive.ubuntu.com wily-updates/multiverse Translation-en
Hit http://il.archive.ubuntu.com wily-updates/restricted Translation-en
Hit http://il.archive.ubuntu.com wily-updates/universe Translation-en
Hit http://il.archive.ubuntu.com wily-backports/main Sources
Hit http://il.archive.ubuntu.com wily-backports/restricted Sources
Hit http://il.archive.ubuntu.com wily-backports/universe Sources
Hit http://il.archive.ubuntu.com wily-backports/multiverse Sources
Hit http://il.archive.ubuntu.com wily-backports/main amd64 Packages
Hit http://il.archive.ubuntu.com wily-backports/restricted amd64 Packages
Hit http://il.archive.ubuntu.com wily-backports/universe amd64 Packages
Hit http://il.archive.ubuntu.com wily-backports/multiverse amd64 Packages
Hit http://il.archive.ubuntu.com wily-backports/main i386 Packages
Hit http://il.archive.ubuntu.com wily-backports/restricted i386 Packages
Hit http://il.archive.ubuntu.com wily-backports/universe i386 Packages
Get:1 http://security.ubuntu.com wily-security InRelease [65.9 kB]
Hit http://il.archive.ubuntu.com wily-backports/multiverse i386 Packages
Hit http://il.archive.ubuntu.com wily-backports/main Translation-en
Hit http://il.archive.ubuntu.com wily-backports/multiverse Translation-en
Hit http://il.archive.ubuntu.com wily-backports/restricted Translation-en
Hit http://il.archive.ubuntu.com wily-backports/universe Translation-en
Get:2 http://security.ubuntu.com wily-security/main Sources [45.5 kB]
Get:3 http://security.ubuntu.com wily-security/restricted Sources [2,854 B]
Get:4 http://security.ubuntu.com wily-security/universe Sources [11.7 kB]
Get:5 http://security.ubuntu.com wily-security/multiverse Sources [2,782 B]
Get:6 http://security.ubuntu.com wily-security/main amd64 Packages [145 kB]
Get:7 http://security.ubuntu.com wily-security/restricted amd64 Packages [10.9 k                                                                                                                                                             B]
Get:8 http://security.ubuntu.com wily-security/universe amd64 Packages [52.1 kB]
Get:9 http://security.ubuntu.com wily-security/multiverse amd64 Packages [6,253                                                                                                                                                              B]
Get:10 http://security.ubuntu.com wily-security/main i386 Packages [142 kB]
Get:11 http://security.ubuntu.com wily-security/restricted i386 Packages [10.8 k                                                                                                                                                             B]
Get:12 http://security.ubuntu.com wily-security/universe i386 Packages [52.1 kB]
Get:13 http://security.ubuntu.com wily-security/multiverse i386 Packages [6,430                                                                                                                                                              B]
Hit http://security.ubuntu.com wily-security/main Translation-en
Hit http://security.ubuntu.com wily-security/multiverse Translation-en
Hit http://security.ubuntu.com wily-security/restricted Translation-en
Hit http://security.ubuntu.com wily-security/universe Translation-en
Fetched 555 kB in 2s (227 kB/s)
Reading package lists... Done

o que devo fazer para atualizá-lo? São atualizações de segurança e parece importante

Sempre corro apt-get upgrade -y depois de "atualizar".

NÃO deletei o arquivo de bloqueio e segui o segundo comentário desta postagem: Não é possível bloquear o diretório de administração (/ var / lib / dpkg /) é outro processo que o utiliza? E isso não está ajudando. Eu não consigo ver o processo que está segurando 'apt'

root      3004  0.0  0.0   9496  2260 pts/0    S+   10:32   0:00 grep --color=auto apt-get
root@YHserver:/home/myserver# kill -9 3004
bash: kill: (3004) - No such process
root@YHserver:/home/myserver# kill -9 2260
bash: kill: (2260) - No such process
root@YHserver:/home/myserver# kill -9 9496
bash: kill: (9496) - No such process
    
por Hatzil666 19.04.2016 / 09:10

2 respostas

3
E: Could not open lock file /var/lib/apt/lists/lock - open (13: Permission denie                                                                                                                                                             d)
E: Unable to lock directory /var/lib/apt/lists/
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?

Parece que você tem algum tipo de problema de permissão.

myserver@YHserver ...

Você deve ser root ao atualizar / atualizar. Parece que você é "myserver" em vez de root. Você se conecta à máquina via ssh ou diretamente? (Você precisa habilitar "root via ssh")

Por favor, tente executar os comandos que patrick escreveu e relatar o resultado aqui

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

Se isso não ajudar, tente o seguinte:

su
apt-get update
apt-get upgrade -y

Outra possibilidade que me vem à mente: você verificou dist-upgrades?

sudo apt-get dist-upgrade
    
por Alex 19.04.2016 / 09:38
0

tente isso

sudo apt-get update;sudo apt-get upgrade -y

eu uso muito isso e ele atualizará todos os pacotes instalados se houver uma atualização disponível

    
por patrick 19.04.2016 / 09:14