Apt upgrade not working

when running apt update i get the following errors,

I moved your post into a new topic as it has no relation to the other one (moving your SD card to a SSD).

Next: pls try to avoid doing screen prints, you should be able to copy everything directly from SSH terminal

can you share following

apt update
apt upgrade
1 Like

sorry copying it seems to not work, i apolgise for the trouble

apt update
Hit:1 https://download.mono-project.com/repo/debian buster InRelease
Hit:2 https://deb.debian.org/debian bullseye InRelease
Hit:3 https://deb.debian.org/debian bullseye-updates InRelease
Hit:4 https://deb.debian.org/debian-security bullseye-security InRelease
Hit:5 https://deb.debian.org/debian bullseye-backports InRelease
Hit:6 https://archive.raspberrypi.org/debian bullseye InRelease
Hit:7 https://packagecloud.io/ookla/speedtest-cli/debian bullseye InRelease
Reading package lists... Error!
E: Problem parsing dependency 21 of libpython3.9-stdlib:arm64=3.9.2-1
E: Error occurred while processing libpython3.9-stdlib (NewVersion2)
E: Problem with MergeList /var/lib/dpkg/status
E: The package lists or status file could not be parsed or opened.
apt upgrade
Reading package lists... Error!
E: Problem parsing dependency 21 of libpython3.9-stdlib:arm64=3.9.2-1
E: Error occurred while processing libpython3.9-stdlib (NewVersion2)
E: Problem with MergeList /var/lib/dpkg/status
E: The package lists or status file could not be parsed or opened.

same thing keeps happening

let’s try following.

/boot/dietpi/func/dietpi-set_software apt-cache clean
apt update
root@iphone:~# /boot/dietpi/func/dietpi-set_software apt-cache clean

 DietPi-Set_software
─────────────────────────────────────────────────────
 Mode: apt-cache (clean)

[  OK  ] DietPi-Set_software | rm -Rf /tmp/apt /var/cache/apt /var/lib/apt/lists /var/lib/apt/mirrors /var/lib/apt/periodic /var/lib/apt/cdroms.list
[  OK  ] DietPi-Set_software | mkdir -p /var/cache/apt/archives
[  OK  ] apt-cache clean | Completed
root@iphone:~# aptupdate
-bash: aptupdate: command not found
root@iphone:~# apt update
Get:1 https://deb.debian.org/debian bullseye InRelease [116 kB]
Get:2 https://download.mono-project.com/repo/debian buster InRelease [5874 B]                                               
Get:3 https://deb.debian.org/debian bullseye-updates InRelease [44.1 kB]                                                         
Get:4 https://deb.debian.org/debian-security bullseye-security InRelease [48.4 kB]                     
Get:5 https://archive.raspberrypi.org/debian bullseye InRelease [23.6 kB]                              
Get:6 https://deb.debian.org/debian bullseye-backports InRelease [49.0 kB]                             
Get:7 https://download.mono-project.com/repo/debian buster/main arm64 Packages [48.2 kB]
Get:9 https://download.mono-project.com/repo/debian buster/main i386 Packages [48.9 kB]
Get:10 https://deb.debian.org/debian bullseye/main arm64 Packages [8072 kB]
Get:8 https://packagecloud.io/ookla/speedtest-cli/debian bullseye InRelease [24.5 kB]
Get:11 https://deb.debian.org/debian bullseye/non-free arm64 Packages [73.0 kB]         
Get:12 https://deb.debian.org/debian bullseye/main i386 Packages [8122 kB]
Get:13 https://archive.raspberrypi.org/debian bullseye/main i386 Packages [175 kB]
Get:14 https://archive.raspberrypi.org/debian bullseye/main arm64 Packages [302 kB]          
Get:15 https://deb.debian.org/debian bullseye/non-free i386 Packages [79.3 kB]               
Get:16 https://deb.debian.org/debian bullseye/contrib arm64 Packages [41.0 kB]
Get:17 https://deb.debian.org/debian bullseye/contrib i386 Packages [45.3 kB]
Get:18 https://deb.debian.org/debian bullseye-updates/main arm64 Packages [12.0 kB]
Get:19 https://deb.debian.org/debian bullseye-updates/main i386 Packages [15.1 kB]
Get:20 https://deb.debian.org/debian-security bullseye-security/main arm64 Packages [218 kB]
Get:21 https://deb.debian.org/debian-security bullseye-security/non-free i386 Packages [528 B]
Get:22 https://deb.debian.org/debian-security bullseye-security/main i386 Packages [220 kB]
Get:23 https://deb.debian.org/debian bullseye-backports/non-free arm64 Packages [9868 B]
Get:24 https://deb.debian.org/debian bullseye-backports/main arm64 Packages [382 kB]
Get:25 https://deb.debian.org/debian bullseye-backports/non-free i386 Packages [12.8 kB]
Get:26 https://deb.debian.org/debian bullseye-backports/main i386 Packages [382 kB]
Get:27 https://deb.debian.org/debian bullseye-backports/contrib arm64 Packages [4536 B]
Get:28 https://deb.debian.org/debian bullseye-backports/contrib i386 Packages [4948 B]
Get:29 https://packagecloud.io/ookla/speedtest-cli/debian bullseye/main i386 Packages [1191 B]
Get:30 https://packagecloud.io/ookla/speedtest-cli/debian bullseye/main arm64 Packages [1193 B]
Fetched 18.6 MB in 12s (1552 kB/s)                                                                                               
Reading package lists... Error!
E: Problem parsing dependency 21 of libpython3.9-stdlib:arm64=3.9.2-1
E: Error occurred while processing libpython3.9-stdlib (NewVersion2)
E: Problem with MergeList /var/lib/dpkg/status
E: The package lists or status file could not be parsed or opened.

the name is iphone so i could stop someone on my network from getting rid of the pi.

ok try following

mv /var/lib/dpkg/status /var/lib/dpkg/status.old
touch /var/lib/dpkg/status
apt update
2 Likes
mv /var/lib/dpkg/status /var/lib/dpkg/status.old
root@iphone:~# touch /var/lib/dpkg/status
root@iphone:~# touch /var/lib/dpkg/status
root@iphone:~# apt update
Hit:1 https://download.mono-project.com/repo/debian buster InRelease
Hit:2 https://deb.debian.org/debian bullseye InRelease                                      
Hit:3 https://deb.debian.org/debian bullseye-updates InRelease                              
Hit:4 https://deb.debian.org/debian-security bullseye-security InRelease                    
Hit:5 https://deb.debian.org/debian bullseye-backports InRelease                            
Hit:6 https://archive.raspberrypi.org/debian bullseye InRelease                             
Hit:7 https://packagecloud.io/o`Preformatted text`okla/speedtest-cli/debian bullseye InRelease                 
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
All packages are up to date.

also apt upgrade,

apt upgrade
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

it worked thanks a lot!

1 Like