All apt
-like commands failed to create the lock file, because /var/lib/dpkg/
doesn't exist. Also, /lost+found/
has contents:
pi@pi-top:~ $ sudo ls -al /lost+found/
total 102456
drwx------ 11 root root 16384 Apr 3 16:26 .
drwxr-xr-x 23 root root 4096 May 5 17:00 ..
-rw------- 1 root root 104857600 Apr 3 16:30 #29025
lrwxrwxrwx 1 root root 9 Mar 29 10:05 #87867 -> /run/lock
lrwxrwxrwx 1 root root 4 Mar 29 10:05 #87868 -> /run
drwxr-xr-x 2 root root 4096 May 5 10:35 #89863
drwxr-xr-x 12 root root 4096 Apr 3 16:41 #89864
drwxr-xr-x 44 root root 4096 Apr 3 16:30 #89865
drwxrwsr-x 2 root staff 4096 Mar 12 14:03 #89866
drwxr-xr-x 6 root root 4096 May 5 16:30 #89867
drwxrwsr-x 2 root mail 4096 Mar 29 10:05 #89868
drwxr-xr-x 2 root root 4096 Mar 29 10:05 #89869
drwxr-xr-x 5 root root 4096 Mar 29 10:32 #89870
drwxrwxrwt 3 root root 4096 May 5 16:31 #89871
Lots of /var/lib/
is also missing, though the system isn't showing any other symptoms. Is it possible to recover the system (or at least dpkg
)? If so, how?
dpkg
's directory and files.lost+found
?/var/lib/dpkg
, it would be a completely different question.