Jump to content

!PROBLEM! On a production raspberry pi 3b+ apt not working

Go to solution Solved by Jarsky,

It looks like your dpkg is damaged from all those dpkg errors. 

 

First remove any 3rd party PPA's, you can check in the sources to see if you have any additional config files, e.g

ls -la /etc/apt/sources.list.d/

 

Or you can check if you have any in your primary apt sources.list

 

cat /etc/apt/sources.list

 

Once you've confirmed that is only the official repos for your distro, then try clearing dpkg and rebuilding it with APT

 

sudo dpkg --clear-avail
sudo dpkg --configure -a
sudo apt-get update

 

Hi, i have a very bad problem. Many files binaries and apt files like packagename.list and packagename.postinst dont output anithing with cat and with nano they only contain "@" i think this was a problem caused by an apt upgrade. Now i get following errors whenn i try to reinstall raspi-config:

 

Package lists are read... Done
Dependency tree is built... Done
Status information is read... Done
0 updated, 0 reinstalled, 1 reinstalled, 0 to remove and 1 not updated.
There are still 0 B of 30.7 kB of archives to be downloaded.
After this operation, 0 B of additional disk space is used.
Use of uninitialized value $value in substitution (s///) at /usr/share/perl5/Debconf/Format/822.pm line 65, <__ANONIO__> line 1.
Use of uninitialized value $item in hash element at /usr/share/perl5/Debconf/DbDriver/File.pm line 85, <__ANONIO__> chunk 1.
Use of uninitialized value $value in substitution (s///) at /usr/share/perl5/Debconf/Format/822.pm line 65, <__ANONIO__> line 1.
Use of uninitialized value $item in hash element at /usr/share/perl5/Debconf/DbDriver/File.pm line 85, <__ANONIO__> chunk 1.
dpkg: Warning: file list file of package "weewx" is missing; it is assumed,
 that the package currently has no files installed
dpkg: Warning: File list file of package "arandr" is missing; it is assumed,
 that the package does not currently have any files installed
dpkg: Warning: File list file of package "raspi-config" is missing; it is assumed
 that the package does not currently have any files installed
dpkg: unrecoverable fatal error, abort:
Final line feed missing in file list file of package "gldriver-test".
E: Sub-process /usr/bin/dpkg returned an error code (2)

And if i now would remove /var/lib/dpkg/info/gldriver-test.* (because they are also filled with @) it changes into a dpkg: warning: files list... and a new package appears on dpkg: unrecoverable fatal error... 

What should i do??

 

Thankyou very much in advance for any helpfull advice

Link to comment
Share on other sites

Link to post
Share on other sites

It looks like your dpkg is damaged from all those dpkg errors. 

 

First remove any 3rd party PPA's, you can check in the sources to see if you have any additional config files, e.g

ls -la /etc/apt/sources.list.d/

 

Or you can check if you have any in your primary apt sources.list

 

cat /etc/apt/sources.list

 

Once you've confirmed that is only the official repos for your distro, then try clearing dpkg and rebuilding it with APT

 

sudo dpkg --clear-avail
sudo dpkg --configure -a
sudo apt-get update

 

Spoiler

Desktop: Ryzen9 5950X | ASUS ROG Crosshair VIII Hero (Wifi) | EVGA RTX 3080Ti FTW3 | 32GB (2x16GB) Corsair Dominator Platinum RGB Pro 3600Mhz | EKWB EK-AIO 360D-RGB | EKWB EK-Vardar RGB Fans | 1TB Samsung 980 Pro, 4TB Samsung 980 Pro | Corsair 5000D Airflow | Corsair HX850 Platinum PSU | Asus ROG 42" OLED PG42UQ + LG 32" 32GK850G Monitor | Roccat Vulcan TKL Pro Keyboard | Logitech G Pro X Superlight  | MicroLab Solo 7C Speakers | Audio-Technica ATH-M50xBT2 LE Headphones | TC-Helicon GoXLR | Audio-Technica AT2035 | LTT Desk Mat | XBOX-X Controller | Windows 11 Pro

 

Spoiler

Server: Fractal Design Define R6 | Ryzen 3950x | ASRock X570 Taichi | EVGA GTX1070 FTW | 64GB (4x16GB) Corsair Vengeance LPX 3000Mhz | Corsair RM850v2 PSU | Fractal S36 Triple AIO | 12 x 8TB HGST Ultrastar He10 (WD Whitelabel) | 500GB Aorus Gen4 NVMe | 2 x 2TB Samsung 970 Evo Plus NVMe | LSI 9211-8i HBA

 

Link to comment
Share on other sites

Link to post
Share on other sites

^ good advice above, you've done something to break your package system.

That can happen from applying the wrong sources or ppa. Or maybe preforming dangerous actions or mismatched version packages.

Beware, these kinds of problems are difficult to untangle sometimes. Always remember to only use packages from reliable sources for your distro and your distro version.

"Only proprietary software vendors want proprietary software." - Dexter's Law

Link to comment
Share on other sites

Link to post
Share on other sites

Thank you for the adivces you gave. After i've done this i got many other problems like content is swaping between files where they shouldn't be...

So i tried to format the hole 256 Gb Sandisk Ultra Plus micro sd card but i cannot delete any partition on it nither with diskpart nor with windows explorer. So it looks to me as some sectors are broken and started to cause problems when the content should be spreaded into them. Could this be a possible answer to why the storage behaved so strange?

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×