Monday, April 29, 2024
 Popular · Latest · Hot · Upcoming
0
rated 0 times [  0] [ 0]  / answers: 1 / hits: 2981  / 2 Years ago, thu, december 30, 2021, 2:27:23

While trying to solve some package conflicts, mistakenly I ran this command on my Ubuntu-Precise:



sudo dpkg -r --force-all libc6


Consequently in a second all of the packages with a dependency to libc6 are removed, and whatever command I run, I get



-bash: /usr/bin/MY_COMMAND: No such file or directory


I can access the /bin/busybox but then when I want to reinstall libc6 package via



/bin/busybox dpkg --force-depends -i install libc6


I get "permission denied".



The Sudo command of course doesn't work either!!



Does anyone has a suggestion on how I can install unistalled packages!


More From » dpkg

 Answers
6

You could login as root, but Ubuntu locks the root account by default and you have probably uninstalled the tools needed to enable it. You could possibly find a su binary and just add it to /usr/bin/su. But you would need to add all the dependencies from scratch.



You could follow the advice here and use a chroot environment with a liveCD to reinstall libc6.



I think your best bet, unless you want to spend hours scraping together tar files, is to reinstall your system and hope that you have current backups.



There is a post on serverfault about this problem. But unless you have a lot of time on your hands I would just reinstall.


[#30815] Thursday, December 30, 2021, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
wherejuic

Total Points: 53
Total Questions: 123
Total Answers: 117

Location: Zambia
Member since Mon, Jan 23, 2023
1 Year ago
wherejuic questions
Thu, Aug 19, 21, 18:07, 3 Years ago
Wed, May 12, 21, 03:23, 3 Years ago
Sat, Nov 13, 21, 05:27, 3 Years ago
Mon, Sep 5, 22, 17:36, 2 Years ago
;