dpkg? [LÖST]

Paul Ljungberg
Inlägg: 13
Blev medlem: 06 aug 2008, 14:41
OS: Ubuntu
Utgåva: 22.04 Jammy Jellyfish LTS

dpkg? [LÖST]

Inlägg av Paul Ljungberg »

Jag gjorde (eller försökte göra) en uppgradering av systemet. Efteråt när jag försökte komma in på pakethanteraren, fick jag följande meddelande:
"E: dpkg was interrupted, you must manually run 'dpkg -configure -a' to correct the problem."
Hur gör jag? [Löst]
Senast redigerad av 2 Paul Ljungberg, redigerad totalt 7 gång.
Användarvisningsbild
pun
Inlägg: 5317
Blev medlem: 20 okt 2007, 22:11
OS: Ubuntu
Utgåva: 23.04 Lunar Lobster

Re: dpkg?

Inlägg av pun »

Kort svar på lösning

Starta terminalen

Kod: Markera allt

sudo dpkg -configure -a

Långt svar hämtat från den här, http://ubuntuforums.org/showthread.php?t=766683
DID YOU HAVE ERRORS?


Note: You may have to perform "sudo apt-get update" twice after recovering from any of the errors below.

Common Errors: If you had errors while trying to do the above, one of these following commands may help. Did the terminal tell you to run "dpkg --configure -a"? All you have to do is add "sudo" to the front of that command, like so:

sudo dpkg --configure -a

or if it was the install -f command:

sudo apt-get install -f

Then make sure your system is up to date:

sudo apt-get update && sudo apt-get upgrade && sudo apt-get dist-upgrade

Non-Existent Packages: Do you keep getting messages that certain packages don't exist and can't be installed? First of all, make sure you have enabled the Medibuntu, Universe and Multiverse repositories. If you're certain that you have the necessary repositories enabled, then you may have a currupt apt list due to an interrupted "apt-get update", which would then make the package manager think certain packages don't exist on the server. Execute both of these commands in the terminal:

sudo rm /var/lib/apt/lists/partial/*

sudo apt-get update

Newline Error/Package Error: An error which can prevent ANY system update/upgrade or package installation is the troublesome "final newline error", but there are also other errors and curruptions which can prevent upgrades and installations. If you notice the same package or application being mentioned when you're trying to upgrade or install something completely unrelated to it, take a note of which package the error is referring to, copy and paste the command below into the terminal, replace the "filename*" example with the name of the package that's giving you grief, then execute the edited command to remove the currupt file(s):

sudo rm /var/lib/dpkg/info/filename*

sudo apt-get update

This doesn't mean the package has been removed, just the pre/post-install scripts, md5sums and file lists related to it. You should reinstall the package - even if you plan to remove it, as those deleted and currupted files related to it will be replaced with non-currupted ones.

Forbidden 403 Error: Those of you receiving the "Forbidden 403" error should change your sources from "http" to "ftp". You can change it by opening the sources file with the default text editor (substitute "gedit" for "kwrite" in Kubuntu and "mousepad" in Xubuntu)
from within the terminal:

gksudo gedit /etc/apt/sources.list

Change all instances of "http" to "ftp", then close and save the changes made. You should now be able to update the list of available packages:

sudo apt-get update

Once your errors are fixed, try repeating the command to install the restricted packages for your particular Ubuntu variant.

Det finns då inget GUI sätt att reparera paketknas som kan uppkomma mer än att köra
repkommandon via Terminalen. För Ubuntu så måste man då även använda sudo.
Paul Ljungberg
Inlägg: 13
Blev medlem: 06 aug 2008, 14:41
OS: Ubuntu
Utgåva: 22.04 Jammy Jellyfish LTS

Re: dpkg?

Inlägg av Paul Ljungberg »

Hej och tack för ditt svar.
Jag gjorde som du sa, men fick upp 'lösenord:' vilket jag inte känner till eller hade någon möjlighet att skriva in ngt.
?
Användarvisningsbild
pun
Inlägg: 5317
Blev medlem: 20 okt 2007, 22:11
OS: Ubuntu
Utgåva: 23.04 Lunar Lobster

Re: dpkg?

Inlägg av pun »

Jo skriv samma lösenord som när du loggar in

sudo kommandot ger dig systemrättigheter så det är en säkerhetsfunktion i Ubuntu
Paul Ljungberg
Inlägg: 13
Blev medlem: 06 aug 2008, 14:41
OS: Ubuntu
Utgåva: 22.04 Jammy Jellyfish LTS

Re: dpkg?

Inlägg av Paul Ljungberg »

Hej igen
Jag kom på det sen. Det vara bara så att det inte syntes när jag skrev lösenordet. Jag tror problemet är löst nu efter det att jag gick igenom kommandona. Där var tydligen ett trasigt paket. 'ubuntu desktop' Jag får se hur det går
Användarvisningsbild
pun
Inlägg: 5317
Blev medlem: 20 okt 2007, 22:11
OS: Ubuntu
Utgåva: 23.04 Lunar Lobster

Re: dpkg?

Inlägg av pun »

Lite trick från det långa svaret

Du kan kolla om det är OK med

Kod: Markera allt

sudo apt-get update
Enter

Sen har terminalen ett smart minne via Pil upp/ner så att man slipper skriva samma saker.... ;)
Paul Ljungberg
Inlägg: 13
Blev medlem: 06 aug 2008, 14:41
OS: Ubuntu
Utgåva: 22.04 Jammy Jellyfish LTS

Re: dpkg?

Inlägg av Paul Ljungberg »

Allt verkar ok nu. Tack för all hjälp.
mvh
Skriv svar

Återgå till "För nybörjaren - inaktuell"