how to fix problems after a filesystem error

If none of the more specific forums is the right place to ask

how to fix problems after a filesystem error

Postby drowsy » 2018-10-02 15:55

Hi,

I had a filesystem error (fsck generated 283 megabytes in lost & found). The system boots now,
but a bunch of packages do not run.

For example:

sudo dpkg --install python-apt_1.6.2_amd64.deb
(Reading database ... 346977 files and directories currently installed.)
Preparing to unpack python-apt_1.6.2_amd64.deb ...
Traceback (most recent call last):
File "/usr/bin/pyclean", line 31, in <module>
from debpython import files as dpf
ImportError: No module named debpython
dpkg: warning: old python-apt package pre-removal script subprocess returned error exit status 1
dpkg: trying script from the new package instead ...
Traceback (most recent call last):
File "/usr/bin/pyclean", line 31, in <module>
from debpython import files as dpf
ImportError: No module named debpython
dpkg: error processing archive python-apt_1.6.2_amd64.deb (--install):
new python-apt package pre-removal script subprocess returned error exit status 1
Traceback (most recent call last):
File "/usr/bin/pycompile", line 35, in <module>
from debpython.version import SUPPORTED, debsorted, vrepr, \
ImportError: No module named debpython.version
dpkg: error while cleaning up:
installed python-apt package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
python-apt_1.6.2_amd64.deb


It seems like some python files got lost. How can I fix it? Any ideas?


On a separate note, I will be installing a new SSD this weekend and replacing the current one.
drowsy
 
Posts: 31
Joined: 2006-12-21 20:43

Re: how to fix problems after a filesystem error

Postby drowsy » 2018-10-02 16:08

will be also grateful for tips on how to migrate to a new SSD (given that the current system boots) faster and with the least amount of pain. Last time I installed Debian was in 2013 when I bought this desktop.
drowsy
 
Posts: 31
Joined: 2006-12-21 20:43

Re: how to fix problems after a filesystem error

Postby bw123 » 2018-10-02 16:13

apt and aptitude both have pretty decent problem resolver, why use dpkg directly? I would not do any hardware upgrades until the system is clean and working correctly, no sense in cloning problems over to another drive, except as a backup to work on.
User avatar
bw123
 
Posts: 3580
Joined: 2011-05-09 06:02
Location: TN_USA

Re: how to fix problems after a filesystem error

Postby drowsy » 2018-10-02 16:39

bw123 wrote:apt and aptitude both have pretty decent problem resolver, why use dpkg directly? I would not do any hardware upgrades until the system is clean and working correctly, no sense in cloning problems over to another drive, except as a backup to work on.


Neither of them run correctly due to the same issue with python.
drowsy
 
Posts: 31
Joined: 2006-12-21 20:43

Re: how to fix problems after a filesystem error

Postby bw123 » 2018-10-02 16:44

show the forum all the output
Code: Select all
apt policy
apt policy python-apt

maybe someone can spot what's going on.
User avatar
bw123
 
Posts: 3580
Joined: 2011-05-09 06:02
Location: TN_USA

Re: how to fix problems after a filesystem error

Postby drowsy » 2018-10-02 17:10

bw123 wrote:show the forum all the output
Code: Select all
apt policy
apt policy python-apt

maybe someone can spot what's going on.


apt policy
Package files:
100 /var/lib/dpkg/status
release a=now
500 http://repo.steampowered.com/steam precise/steam i386 Packages
release o=Valve Software LLC,n=precise,l=Steam,c=steam,b=i386
origin repo.steampowered.com
500 http://repo.steampowered.com/steam precise/steam amd64 Packages
release o=Valve Software LLC,n=precise,l=Steam,c=steam,b=amd64
origin repo.steampowered.com
500 https://repo.skype.com/deb stable/main amd64 Packages
release o=. stable,a=stable,n=stable,l=. stable,c=main,b=amd64
origin repo.skype.com
500 http://ftp.ca.debian.org/debian testing/non-free i386 Packages
release o=Debian,a=testing,n=buster,l=Debian,c=non-free,b=i386
origin ftp.ca.debian.org
500 http://ftp.ca.debian.org/debian testing/non-free amd64 Packages
release o=Debian,a=testing,n=buster,l=Debian,c=non-free,b=amd64
origin ftp.ca.debian.org
500 http://ftp.ca.debian.org/debian testing/contrib i386 Packages
release o=Debian,a=testing,n=buster,l=Debian,c=contrib,b=i386
origin ftp.ca.debian.org
500 http://ftp.ca.debian.org/debian testing/contrib amd64 Packages
release o=Debian,a=testing,n=buster,l=Debian,c=contrib,b=amd64
origin ftp.ca.debian.org
500 http://ftp.ca.debian.org/debian testing/main i386 Packages
release o=Debian,a=testing,n=buster,l=Debian,c=main,b=i386
origin ftp.ca.debian.org
500 http://ftp.ca.debian.org/debian testing/main amd64 Packages
release o=Debian,a=testing,n=buster,l=Debian,c=main,b=amd64
origin ftp.ca.debian.org
Pinned packages:




apt policy python-apt
python-apt:
Installed: 1.6.2
Candidate: 1.6.2
Version table:
*** 1.6.2 500
500 http://ftp.ca.debian.org/debian testing/main amd64 Packages
100 /var/lib/dpkg/status
drowsy
 
Posts: 31
Joined: 2006-12-21 20:43

Re: how to fix problems after a filesystem error

Postby dilberts_left_nut » 2018-10-02 17:37

Do a fresh install on your new disk.
AdrianTM wrote:There's no hacker in my grandma...
User avatar
dilberts_left_nut
 
Posts: 4913
Joined: 2009-10-05 07:54
Location: enzed


Return to General Questions

Who is online

Users browsing this forum: No registered users and 4 guests

fashionable