Score:0

DEBIAN 10 apt-get, sudo issues

th flag

I'm currently facing some issues with my dedicated server. I unfortunately removed some packages from my server yesterday. And now the man-db on my server seems not to work properly. This issue maybe occurs because I removed these packages. I tried to install the needed packages, but this does not work.

Whenever I try to install a package with apt-get install [packagename] I get this error message: apt-get installation try issue

I tried also to use the command apt --fix-broken install but this seems not to work: apt --fix-broken installation command failure

And the sudo command seems not to work properly too: Sudo command error

As you can see, I've booted my server in rescue mode to install the needed packages but it does not work. I've mounted all required directories but these issues still appear. So theres no chance for me to install packages, perform sudo commands.

Whys that? Is it all related to the man-db which causes issues due to some package removals?

FYI: I unfortunately don't know anymore which packages I removed yesterday.

Score:0
ar flag
  1. You are root. You don't need sudo.
  2. I assume this is hetzner based on how it looks. If so, the rescue system is a live distro. You'll have to mount all your devices and chroot into them as applicable. I assume you have done this. Otherwise, you need to first do this and attempt reinstallation; otherwise you're merely attempting to modify the rescue system.
  3. If you've removed Python and ldconfig you're in for a world of hurt. I'd probably select to restore from backup or rebuild from scratch at that point. If that's not an option...:

Start by installing a new system (VM or similar) with the same Debian version. Copy over the binaries that apt complain is missing, such as ldconfig and libcrypt.so1. Try apt again. It's going to take you some time as you will probably discover more missing dependencies.

In addition, you need to find what packages the dependencies you're missing belongs to, and do a apt-get --reinstall install packagename to ensure you got all bits'n'pieces of those packages.

Kuezy avatar
th flag
Hey @vidarlo you got it right: I'm using one of Hetzners dedicated servers. And I know I'm in a lot of pain. I guess restoring from a backup might be the best option for me. I learned from previous mistakes (Hadn't any backups) to have backups, and I guess I'm going to perform a complete reinstallation. I don't know what happened there exactly, but I think I'll learn from this mistake too haha (Never change a running system). I'm going to use test environments in the future to avoid these kinds of “issues”.
vidarlo avatar
ar flag
A good hint is a large number of packages listed by apt. Then you should probably stop and think...
Kuezy avatar
th flag
Do you know by any chance where the files of `ldconfig` or `libcrypt.so1` are located at? I already have a VM with the same OS installed (Debian 10) and I guess I could use that VM in order to try to copy the packages. I'd try to install the missing packages before restoring. I think restoring should be the last option xD
vidarlo avatar
ar flag
You can find them with `find / -name ldconfig`. Doing `find / -name ldconfig 2>/dev/null` to surpress any error messages may make output cleaner..
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.