can't upgrade ubuntu

Asked by adam on 2021-02-15

 when im updates system , im receives the message:

dpkg: error: syntax error in trigger run condition file "/ var / lib / dpkg
": must start with a letter or number" PNG Correct package name " PNG
E: Sub-process / usr / bin / dpkg returned an error code (2)

the problem occurred while updating the package:

i have ubuntu 20.04 lts

Question information

English Edit question
Needs information
Ubuntu Edit question
No assignee Edit question
Last query:
Last reply:
Manfred Hampl (m-hampl) said : #1

For diagnostic purposes please provide the full output that you receive for the commands

uname -a
lsb_release -crid
sudo apt update
sudo dpkg --configure -a

adam (r-admin-gener) said : #2



Linux crew-desktop 5.4.0-64-generic #72-Ubuntu SMP Fri Jan 15 10:27:54 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux

lsb relase

Distributor ID: Ubuntu
Description: Ubuntu 20.04.1 LTS
Release: 20.04
Codename: focal

apt update

Stary:1 focal InRelease
Pobieranie:2 focal-updates InRelease [114 kB]
Stary:3 focal InRelease
Pobieranie:4 focal-security InRelease [109 kB]
Pobieranie:5 focal-backports InRelease [101 kB]
Stary:6 focal InRelease
Stary:7 focal InRelease
Pobieranie:8 focal-updates/main amd64 Packages [808 kB]
Pobieranie:9 focal-updates/main i386 Packages [421 kB]
Pobieranie:10 focal-updates/main amd64 DEP-11 Metadata [264 kB]
Pobieranie:11 focal-updates/main amd64 c-n-f Metadata [11,8 kB]
Pobieranie:12 focal-updates/universe i386 Packages [549 kB]
Pobieranie:13 focal-updates/universe amd64 Packages [740 kB]
Pobieranie:14 focal-updates/universe amd64 DEP-11 Metadata [301 kB]
Pobieranie:15 focal-updates/multiverse amd64 DEP-11 Metadata [2 468 B]
Pobieranie:16 focal-security/main amd64 DEP-11 Metadata [24,2 kB]
Pobieranie:17 focal-security/universe amd64 DEP-11 Metadata [57,5 kB]
Pobieranie:18 focal-backports/universe amd64 DEP-11 Metadata [1 768 B]
Stary:19 buster InRelease
Pobrano 3 505 kB w 2s (1 443 kB/s)
Czytanie list pakietów... Gotowe
Budowanie drzewa zależności
Odczyt informacji o stanie... Gotowe
71 packages can be upgraded. Run 'apt list --upgradable' to see them.

pobieranie = download
stary = old

dpkg --configure -a

dpkg: error: syntax error in trigger run condition file "/ var / lib / dpkg
": must start with a letter or number" PNG Correct package name " PNG
E: Sub-process / usr / bin / dpkg returned an error code (2)

Manfred Hampl (m-hampl) said : #3

What is the output of the command

LANG=C sudo dpkg --audit

adam (r-admin-gener) said : #4

dpkg: error: trigger interest file '/var/lib/dpkg/triggers/linux-update-5.4.0-65': must start with an alphanumeric character '�PNG

adam (r-admin-gener) said : #5

cd /var/lib/dpkg/triggers/

/var/lib/dpkg/triggers# ls

aspell-autobuildhash linux-update-5.4.0-65-generic update-ca-certificates
File linux-update-5.4.0-65-generic-new update-ca-certificates-fresh
ispell-autobuildhash Lock update-default-ispell
ldconfig rygel-restart update-default-wordlist
linux-update-5.4.0-62-generic Unincorp update-initramfs
linux-update-5.4.0-64-generic update-sgmlcatalog

Manfred Hampl (m-hampl) said : #6

What is the output of the commands

ls -l /var/lib/dpkg/triggers/
file /var/lib/dpkg/triggers/linux-update-5.4.0-64-generic
file /var/lib/dpkg/triggers/linux-update-5.4.0-65-generic
file /var/lib/dpkg/triggers/linux-update-5.4.0-65-generic-new

adam (r-admin-gener) said : #7

-rw-r--r-- 1 root root 28 kwi 16 2019 aspell-autobuildhash
-rw-r--r-- 1 root root 2273 sty 23 16:31 File
-rw-r--r-- 1 root root 28 kwi 16 2019 ispell-autobuildhash
-rw-r--r-- 1 root root 9 gru 20 18:09 ldconfig
-rw-r--r-- 1 root root 29 sty 16 00:26 linux-update-5.4.0-62-generic
-rw-r--r-- 1 root root 29 sty 23 16:31 linux-update-5.4.0-64-generic
-rwxr-xr-x 1 root root 6183 kwi 9 2020 linux-update-5.4.0-65-generic
-rw-r--r-- 1 root root 8 sty 28 16:54 linux-update-5.4.0-65-generic-new
-rw------- 1 root root 0 lut 15 21:24 Lock
-rw-r--r-- 1 root root 14 gru 20 18:35 rygel-restart
-rw-r--r-- 1 root root 32 sty 28 16:56 Unincorp
-rw-r--r-- 1 root root 0 lut 15 21:24
-rw-r--r-- 1 root root 16 gru 20 18:18 update-ca-certificates
-rw-r--r-- 1 root root 16 gru 20 18:18 update-ca-certificates-fresh
-rw-r--r-- 1 root root 28 kwi 16 2019 update-default-ispell
-rw-r--r-- 1 root root 28 kwi 16 2019 update-default-wordlist
-rw-r--r-- 1 root root 16 gru 20 18:19 update-initramfs
-rw-r--r-- 1 root root 10 gru 20 18:24 update-sgmlcatalog

file /var/lib/dpkg/triggers/linux-update-5.4.0-64-generic
/var/lib/dpkg/triggers/linux-update-5.4.0-64-generic: ASCII text

file /var/lib/dpkg/triggers/linux-update-5.4.0-65-generic
/var/lib/dpkg/triggers/linux-update-5.4.0-65-generic: PNG image data, 64 x 64, 8-bit/color RGBA, non-interlaced

file /var/lib/dpkg/triggers/linux-update-5.4.0-65-generic-new
/var/lib/dpkg/triggers/linux-update-5.4.0-65-generic-new: data

Manfred Hampl (m-hampl) said : #8

I do not know what happened, but instead of a text file, there is a PNG image file in the triggers directory.
This is nonsense and breaks the package management system.

My suggestion:
Delete the offending file or move it elsewhere.

sudo mv /var/lib/dpkg/triggers/linux-update-5.4.0-65-generic ~/

and then run

sudo dpkg --configure -a

Does updating work again?

adam (r-admin-gener) said : #9

i can't.

mv: cannot move '/var/lib/dpkg/triggers/linux-update-5.4.0-65-generic' to '/home/crew/linux-update-5.4.0-65-generic': Read-only file system

im try use chmod 777 and chown bot still can't remove this file.

adam (r-admin-gener) said : #10

dpkg --configure -a

unable to access the dpkg database directory /var/lib/dpkg: Read-only file system

also my system debian on virtual box stoped working ... and monero wallet doesn't start at all.

Manfred Hampl (m-hampl) said : #11

"Read-only file system"

Something severe happen to your system. You have to reboot before you can do anything.

adam (r-admin-gener) said : #12

I wonder what happened. There was a problem while updating and it keeps getting worse.
I deleted linux-update-5.4.0-65-generic and now I cannot execute the command dpkg --configure -a because another package depends on linux-update 5.4.0.
I launched the update and upgrade

apt update && apt upgrade (as root)

There were errors while processing:
Error: Timeout was reached
E: Sub-process /usr/bin/dpkg returned an error code (1)

I think I need to reinstall the system

Manfred Hampl (m-hampl) said : #13

What is the full output of the command

sudo dpkg --configure -a

Can you help with this problem?

Provide an answer of your own, or ask adam for more information if necessary.

To post a message you must log in.