Update hangs

Questions about applications and software
Forum rules
Before you post please read how to get help
Post Reply
samiel60
Level 3
Level 3
Posts: 120
Joined: Thu Apr 13, 2017 1:03 pm

Update hangs

Post by samiel60 » Mon Jul 16, 2018 3:41 pm

Until yesterday i'd no problem for packages update
Today. from console, with aptitude update I gain:

Code: Select all

root@darkstar:~# aptitude update
Trovato http://archive.canonical.com/ubuntu bionic InRelease
Trovato http://archive.ubuntu.com/ubuntu bionic InRelease                       
0% [InRelease gpgv 10,2 kB] [Connessione a packagecloud.io] [In attesa degli heagpgv: Signature made ven 13 lug 2018 21:28:21 CEST
gpgv:                using RSA key 3B4FE6ACC0B21F32
gpgv: Good signature from "Ubuntu Archive Automatic Signing Key (2012) <ftpmaster@ubuntu.com>"
/usr/bin/apt-key: 624: /usr/bin/apt-key: cannot create /dev/null: Permission denied
58% [Connessione a packagecloud.io] [In attesa degli header] [Connessione a packgpgv: Signature made ven 27 apr 2018 01:38:40 CEST
gpgv:                using RSA key 3B4FE6ACC0B21F32
gpgv: Good signature from "Ubuntu Archive Automatic Signing Key (2012) <ftpmaster@ubuntu.com>"
/usr/bin/apt-key: 624: /usr/bin/apt-key: cannot create /dev/null: Permission denied
Trovato https://packagecloud.io/AtomEditor/atom/any any InRelease               
88% [In attesa degli header] [In attesa degli header] [In attesa degli header] [gpgv: Signature made mer 11 lug 2018 19:35:57 CEST
gpgv:                using RSA key 4C6E74D6C0A35108
gpgv: Good signature from "https://packagecloud.io/AtomEditor/atom (https://packagecloud.io/docs#gpg_signing) <support@packagecloud.io>"
/usr/bin/apt-key: 624: /usr/bin/apt-key: cannot create /dev/null: Permission denied
91% [In attesa degli header] [In attesa degli header] [In attesa degli header] [
Moreover, the upgrade app tells me:

Code: Select all

Failed to lock /var/lib/apt/lists/lock
and all hangs. Is it a problem of mine, or is it a repository trouble?
thanx
s

User avatar
karlchen
Level 19
Level 19
Posts: 9080
Joined: Sat Dec 31, 2011 7:21 am
Location: Germany

Re: Update hangs

Post by karlchen » Mon Jul 16, 2018 5:29 pm

Hi, samiel60.

The final message which you posted Failed to lock /var/lib/apt/lists/lock tells that aptitude failed to lock the named file.
This very likely means that another application had locked it a short time before. I would not be amazed if this other application was Linux Mint Update Manager, which checks for available software updates in regular intervals.

In case the issue should not have simply disappeared, I would suggest to logoff and log back in to the graphical desktop.
Then wait till Update Manager has refreshed its list, which it will do briefly after login. Check the status of the shield icon in the bottom panel.
As long as the shield is gray, mintpdate will be still retrieving the list of available updates.
In case the shield displays a green tick mark, the list has been refreshed (nothing to be updated).
In case the shield displays a white letter i on blue background, the list has been refreshed (updates available).

You should now be able to run your aptitude commandline.
In case it still runs into the locking error, reboot and try again.
But why do you have to use "aptitude update" at all? The Update Manager will inform you about available updates.

Regards,
Karl
Image
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.

samiel60
Level 3
Level 3
Posts: 120
Joined: Thu Apr 13, 2017 1:03 pm

Re: Update hangs

Post by samiel60 » Mon Jul 16, 2018 6:28 pm

I poweroff my machine. After reboot, I gave:

Code: Select all

root@darkstar:~# rm -r /var/lib/apt/lists/*
root@darkstar:~# rm -r /var/lib/apt/lists/partial/*
rm: impossibile rimuovere '/var/lib/apt/lists/partial/*': File o directory non esistente
root@darkstar:~# rm /var/lib/dpkg/lock 
root@darkstar:~# rm /var/lib/apt/lists/lock
rm: impossibile rimuovere '/var/lib/apt/lists/lock': File o directory non esistente
root@darkstar:~# rm /var/cache/apt/archives/lock
root@darkstar:~# apt-get autoclean && apt-get clean && apt-get autoremove
Lettura elenco dei pacchetti... Fatto
Generazione albero delle dipendenze       
Lettura informazioni sullo stato... Fatto
Lettura elenco dei pacchetti... Fatto
Generazione albero delle dipendenze       
Lettura informazioni sullo stato... Fatto
0 aggiornati, 0 installati, 0 da rimuovere e 0 non aggiornati.
Now I try to update from the update manager. It download many data,
but hangs at Components-amd64 http:archive.ubuntu.com/ubuntu bionic-backports/universe qmd64 DEP-11 Metadata

samiel60
Level 3
Level 3
Posts: 120
Joined: Thu Apr 13, 2017 1:03 pm

Re: Update hangs

Post by samiel60 » Mon Jul 16, 2018 6:52 pm

A message tells me that apt cache is corrupted.
I changded the mirrors, but the problem persists...

truesarang
Level 1
Level 1
Posts: 13
Joined: Sun Jul 08, 2018 2:13 pm

Re: Update hangs

Post by truesarang » Mon Jul 16, 2018 10:29 pm

viewtopic.php?t=215890

so basically,

sudo apt-get update
then
sudo apt-get upgrade

or

ps aux | grep '[a]pt'

see if you have process running apt (apt-get or aptitude)

then kill it by kill PID

after making sure no other process of apt

you can do sudo rm /var/lib/apt/lists/lock

and reboot

hope it works..

samiel60
Level 3
Level 3
Posts: 120
Joined: Thu Apr 13, 2017 1:03 pm

Re: Update hangs

Post by samiel60 » Mon Jul 16, 2018 11:45 pm

thanx for your answer, but if u read my two previous posts
u'll realize that I already tried what do u say.

Code: Select all

root@darkstar:~# kill  11646
-su: kill: (11646) - Nessun processo corrisponde
root@darkstar:~# kill  11647
-su: kill: (11647) - Nessun processo corrisponde
root@darkstar:~# kill  11648
-su: kill: (11648) - Nessun processo corrisponde
root@darkstar:~# kill  11663
-su: kill: (11663) - Nessun processo corrisponde
root@darkstar:~# kill  11726
-su: kill: (11726) - Nessun processo corrisponde
root@darkstar:~# ps aux | grep '[a]pt'
root@darkstar:~# rm /var/lib/apt/lists/lock
root@darkstar:~# rm /var/cache/apt/archives/lock
root@darkstar:~# rm /var/lib/dpkg/lock 
root@darkstar:~# rm -r /var/lib/apt/lists/partial/
root@darkstar:~# rm -r /var/lib/apt/lists/
root@darkstar:~# apt-get autoclean && apt-get clean && apt-get autoremove
Lettura elenco dei pacchetti... Fatto
Generazione albero delle dipendenze       
Lettura informazioni sullo stato... Fatto
Lettura elenco dei pacchetti... Fatto
Generazione albero delle dipendenze       
Lettura informazioni sullo stato... Fatto
0 aggiornati, 0 installati, 0 da rimuovere e 0 non aggiornati.
root@darkstar:~# aptutide update
aptutide: comando non trovato
root@darkstar:~# aptitude update
Get: 1 http://archive.ubuntu.com/ubuntu bionic InRelease [242 kB]
Get: 2 http://security.ubuntu.com/ubuntu bionic-security InRelease [83,2 kB]                                                          
Get: 3 http://archive.canonical.com/ubuntu bionic InRelease [10,2 kB]                                                  
Get: 4 http://archive.ubuntu.com/ubuntu bionic-updates InRelease [88,7 kB]                                                      
66% [3 InRelease gpgv 10,2 kB] [In attesa degli header] [4 InRelease 1.136 B/88,7 kB 1%] [2 InRelease 25,4 kB/83,2 kB 31%]gpgv: Signature made ven 13 lug 2018 21:28:21 CEST
gpgv:                using RSA key 3B4FE6ACC0B21F32
gpgv: Good signature from "Ubuntu Archive Automatic Signing Key (2012) <ftpmaster@ubuntu.com>"
/usr/bin/apt-key: 624: /usr/bin/apt-key: cannot create /dev/null: Permission denied
Get: 5 http://archive.ubuntu.com/ubuntu bionic-backports InRelease [74,6 kB]                                              
91% [1 InRelease gpgv 242 kB] [In attesa degli header] [2 InRelease 42,5 kB/83,2 kB 51%] [In attesa degli header]gpgv: Signature made ven 27 apr 2018 01:38:40 CEST
gpgv:                using RSA key 3B4FE6ACC0B21F32
gpgv: Good signature from "Ubuntu Archive Automatic Signing Key (2012) <ftpmaster@ubuntu.com>"
/usr/bin/apt-key: 624: /usr/bin/apt-key: cannot create /dev/null: Permission denied
Get: 6 http://archive.ubuntu.com/ubuntu bionic/main amd64 Packages [1.019 kB]                                    
Get: 7 http://archive.canonical.com/ubuntu bionic/partner i386 Packages [2.300 B]                                                     
2% [4 InRelease gpgv 88,7 kB] [In attesa degli header] [6 Packages 86,9 kB/1.019 kB 9%] [2 InRelease 73,9 kB/83,2 kB 89%] [In attesa dgpgv: Signature made mar 17 lug 2018 03:10:07 CEST
gpgv:                using RSA key 3B4FE6ACC0B21F32
gpgv: Good signature from "Ubuntu Archive Automatic Signing Key (2012) <ftpmaster@ubuntu.com>"
/usr/bin/apt-key: 624: /usr/bin/apt-key: cannot create /dev/null: Permission denied
2% [5 InRelease gpgv 74,6 kB] [In attesa degli header] [6 Packages 235 kB/1.019 kB 23%] [In attesa degli header]gpgv: Signature made mar 17 lug 2018 02:06:56 CEST
gpgv:                using RSA key 3B4FE6ACC0B21F32
gpgv: Good signature from "Ubuntu Archive Automatic Signing Key (2012) <ftpmaster@ubuntu.com>"
/usr/bin/apt-key: 624: /usr/bin/apt-key: cannot create /dev/null: Permission denied
3% [In attesa degli header] [6 Packages 402 kB/1.019 kB 39%] [In attesa degli header]gpgv: Signature made mar 17 lug 2018 02:06:30 CEST
gpgv:                using RSA key 3B4FE6ACC0B21F32
gpgv: Good signature from "Ubuntu Archive Automatic Signing Key (2012) <ftpmaster@ubuntu.com>"
/usr/bin/apt-key: 624: /usr/bin/apt-key: cannot create /dev/null: Permission denied
Get: 8 http://archive.canonical.com/ubuntu bionic/partner amd64 Packages [2.304 B]   
Get: 9 http://archive.canonical.com/ubuntu bionic/partner Translation-en [1.272 B]                                    
Get: 10 http://security.ubuntu.com/ubuntu bionic-security/main i386 Packages [99,6 kB]                                       
Get: 11 http://archive.ubuntu.com/ubuntu bionic/main i386 Packages [1.007 kB]                           
Get: 12 http://archive.ubuntu.com/ubuntu bionic/main Translation-en [516 kB]                                      
Get: 13 http://security.ubuntu.com/ubuntu bionic-security/main amd64 Packages [116 kB]    
Get: 14 http://archive.ubuntu.com/ubuntu bionic/main Translation-it [474 kB]                                         
Get: 15 http://security.ubuntu.com/ubuntu bionic-security/main Translation-en [46,0 kB]                              
Get: 16 http://security.ubuntu.com/ubuntu bionic-security/main amd64 DEP-11 Metadata [204 B]                                       
Get: 17 http://security.ubuntu.com/ubuntu bionic-security/universe i386 Packages [37,1 kB]
Get: 18 http://security.ubuntu.com/ubuntu bionic-security/universe amd64 Packages [37,1 kB]         
Get: 19 http://archive.ubuntu.com/ubuntu bionic/main amd64 DEP-11 Metadata [477 kB]                 
Get: 20 http://security.ubuntu.com/ubuntu bionic-security/universe Translation-en [21,6 kB]                            
Get: 21 http://security.ubuntu.com/ubuntu bionic-security/universe amd64 DEP-11 Metadata [2.448 B]                                 
Get: 22 http://security.ubuntu.com/ubuntu bionic-security/multiverse amd64 Packages [1.168 B]                                         
Get: 23 http://security.ubuntu.com/ubuntu bionic-security/multiverse i386 Packages [1.340 B]                                   
Get: 24 http://security.ubuntu.com/ubuntu bionic-security/multiverse Translation-en [632 B]                                    
Get: 25 http://archive.ubuntu.com/ubuntu bionic/restricted i386 Packages [9.156 B]                                                
Get: 26 http://archive.ubuntu.com/ubuntu bionic/restricted amd64 Packages [9.184 B]
Get: 27 http://archive.ubuntu.com/ubuntu bionic/restricted Translation-it [1.460 B]       
Get: 28 http://archive.ubuntu.com/ubuntu bionic/restricted Translation-en [3.584 B]           
Get: 29 http://archive.ubuntu.com/ubuntu bionic/universe i386 Packages [8.531 kB]               
Get: 30 http://archive.ubuntu.com/ubuntu bionic/universe amd64 Packages [8.570 kB]        
Get: 31 http://archive.ubuntu.com/ubuntu bionic/universe Translation-en [4.941 kB]                                                                                             
Get: 32 http://archive.ubuntu.com/ubuntu bionic/universe Translation-it [3.417 kB]                                                                                              
Get: 33 http://archive.ubuntu.com/ubuntu bionic/universe amd64 DEP-11 Metadata [3.287 kB]                                                                                       
Get: 34 http://archive.ubuntu.com/ubuntu bionic/multiverse i386 Packages [144 kB]                                                                                               
Get: 35 http://archive.ubuntu.com/ubuntu bionic/multiverse amd64 Packages [151 kB]                                                                                              
Get: 36 http://archive.ubuntu.com/ubuntu bionic/multiverse Translation-en [108 kB]                                                                                              
Get: 37 http://archive.ubuntu.com/ubuntu bionic/multiverse Translation-it [27,3 kB]                                                                                             
Get: 38 http://archive.ubuntu.com/ubuntu bionic/multiverse amd64 DEP-11 Metadata [49,7 kB]                                                                                      
Get: 39 http://archive.ubuntu.com/ubuntu bionic-updates/main i386 Packages [186 kB]                                                                                             
Get: 40 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 Packages [204 kB]                                                                                            
Get: 41 http://archive.ubuntu.com/ubuntu bionic-updates/main Translation-en [81,3 kB]                                                                                           
Get: 42 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 DEP-11 Metadata [138 kB]                                                                                     
Get: 43 http://archive.ubuntu.com/ubuntu bionic-updates/universe amd64 Packages [129 kB]                                                                                        
Get: 44 http://archive.ubuntu.com/ubuntu bionic-updates/universe i386 Packages [129 kB]                                                                                         
Get: 45 http://archive.ubuntu.com/ubuntu bionic-updates/universe Translation-en [57,6 kB]                                                                                       
Get: 46 http://archive.ubuntu.com/ubuntu bionic-updates/universe amd64 DEP-11 Metadata [125 kB]                                                                                 
Get: 47 http://archive.ubuntu.com/ubuntu bionic-updates/multiverse amd64 Packages [3.544 B]                                                                                     
Get: 48 http://archive.ubuntu.com/ubuntu bionic-updates/multiverse i386 Packages [3.700 B]                                                                                      
Get: 49 http://archive.ubuntu.com/ubuntu bionic-updates/multiverse Translation-en [2.060 B]                                                                                     
Get: 50 http://archive.ubuntu.com/ubuntu bionic-updates/multiverse amd64 DEP-11 Metadata [2.468 B]                                                                              
Get: 51 http://archive.ubuntu.com/ubuntu bionic-backports/universe i386 Packages [2.704 B]                                                                                      
Get: 52 http://archive.ubuntu.com/ubuntu bionic-backports/universe amd64 Packages [2.704 B]                                                                                     
Get: 53 http://archive.ubuntu.com/ubuntu bionic-backports/universe Translation-en [1.136 B]                                                                                     
Get: 54 http://archive.ubuntu.com/ubuntu bionic-backports/universe amd64 DEP-11 Metadata [5.100 B]                                                                              
100% [In attesa degli header]...............................................................
I deleted running process, apt cache directories, all lock files and tried to update cache,
but it hangs just as before

truesarang
Level 1
Level 1
Posts: 13
Joined: Sun Jul 08, 2018 2:13 pm

Re: Update hangs

Post by truesarang » Tue Jul 17, 2018 1:45 am

do you have access to /dev/null though?

when you do ls -l /dev/null can you access that? or permission denied?

samiel60
Level 3
Level 3
Posts: 120
Joined: Thu Apr 13, 2017 1:03 pm

Re: Update hangs

Post by samiel60 » Tue Jul 17, 2018 4:11 am

I obtain

Code: Select all

samiel@darkstar:~$  ls -l /dev/null
crw-rw-r-- 1 samiel scanner 1, 3 lug 17 10:07 /dev/null
samiel@darkstar:~$ su -
Password: 
root@darkstar:~#  ls -l /dev/null
crw-rw-r-- 1 samiel scanner 1, 3 lug 17 10:07 /dev/null
but I don't understand what does it mean....

samiel60
Level 3
Level 3
Posts: 120
Joined: Thu Apr 13, 2017 1:03 pm

Re: Update hangs

Post by samiel60 » Tue Jul 17, 2018 4:13 am

consider however that until two days ago I've no this trouble
and I didn't change in my configuration

samiel60
Level 3
Level 3
Posts: 120
Joined: Thu Apr 13, 2017 1:03 pm

Re: Update hangs

Post by samiel60 » Tue Jul 17, 2018 10:31 am

and any suggestion for me?
or have i to reinstall? :(

truesarang
Level 1
Level 1
Posts: 13
Joined: Sun Jul 08, 2018 2:13 pm

Re: Update hangs

Post by truesarang » Tue Jul 17, 2018 5:04 pm

open software source official repositories restore the default settings

ppas- delete all the ppas

additional repositories delete all the additional repositories.

authentication keys delete all the keys.

maintenance fix mergelist problems, purge residual configuration, remove foreign packages

do the cache refresh

reboot and see if update manager works or not...worth a try than make a fresh installation.

samiel60
Level 3
Level 3
Posts: 120
Joined: Thu Apr 13, 2017 1:03 pm

Re: Update hangs

Post by samiel60 » Wed Jul 18, 2018 9:46 pm

i solved with a fresh intallation.
even if it would be interesting to know the reason of this trouble....

thanx

Post Reply

Return to “Software & Applications”