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:
linux-image-5.4.0-65-generic

i have ubuntu 20.04 lts

Question information

Language:
English Edit question
Status:
Needs information
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Last query:
2021-02-18
Last reply:
2021-02-19
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

Hello

Uname

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 http://archive.ubuntu.com/ubuntu focal InRelease
Pobieranie:2 http://archive.ubuntu.com/ubuntu focal-updates InRelease [114 kB]
Stary:3 http://archive.canonical.com/ubuntu focal InRelease
Pobieranie:4 http://archive.ubuntu.com/ubuntu focal-security InRelease [109 kB]
Pobieranie:5 http://archive.ubuntu.com/ubuntu focal-backports InRelease [101 kB]
Stary:6 http://ppa.launchpad.net/i2p-maintainers/i2p/ubuntu focal InRelease
Stary:7 http://ppa.launchpad.net/micahflee/ppa/ubuntu focal InRelease
Pobieranie:8 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 Packages [808 kB]
Pobieranie:9 http://archive.ubuntu.com/ubuntu focal-updates/main i386 Packages [421 kB]
Pobieranie:10 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 DEP-11 Metadata [264 kB]
Pobieranie:11 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 c-n-f Metadata [11,8 kB]
Pobieranie:12 http://archive.ubuntu.com/ubuntu focal-updates/universe i386 Packages [549 kB]
Pobieranie:13 http://archive.ubuntu.com/ubuntu focal-updates/universe amd64 Packages [740 kB]
Pobieranie:14 http://archive.ubuntu.com/ubuntu focal-updates/universe amd64 DEP-11 Metadata [301 kB]
Pobieranie:15 http://archive.ubuntu.com/ubuntu focal-updates/multiverse amd64 DEP-11 Metadata [2 468 B]
Pobieranie:16 http://archive.ubuntu.com/ubuntu focal-security/main amd64 DEP-11 Metadata [24,2 kB]
Pobieranie:17 http://archive.ubuntu.com/ubuntu focal-security/universe amd64 DEP-11 Metadata [57,5 kB]
Pobieranie:18 http://archive.ubuntu.com/ubuntu focal-backports/universe amd64 DEP-11 Metadata [1 768 B]
Stary:19 https://deb.whonix.org 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 Unincorp.new 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

ls
-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 Unincorp.new
-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:
 grub-pc
 linux-image-5.4.0-65-generic
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.