0

After having some pacman issues, I am not longer able to boot into my arch linux systemafter grub. All I get is a black screen without the ability to input anything. I believe this is due to accidentally removing the base-devel package and possibly having previous pacman issues I was unaware of.

What happened: I was trying to install PHP for a take home project I'm doing for an interview process. I used sudo pacman -S php and several other variants with different versions, but I always received an error. I forget which error it was, but I believe I got the message that it could not recognize the package. This was the first package I've attempted to install in some months, so I'm unsure if I had pacman issues beforehand or if they just surfaced now. Anyway, I decided to test if it was a pacman issue or some issue with the php package itself. So, I naively thought, "I'll try downloading some random package other than PHP to see if it works, then remove it if it does download since I don't care about it anyway." I was dumb and googled something along of the lines of "cool arch packages" and saw someone mention that base-devel was cool. So, I decided to install it. It worked! Or so I think? Either it worked, or it was already on my system, so I thought it worked since I didn't read the output too closely. Since I thought I didn't need the package I presumably downloaded as a pacman test, I ran sudo pacman -R base-devel to not have that space taken up and everything went south. I assume this is some foundational package and I destroyed my computer. Afterwards, pacman really stopped working altogether. I received an error relating to glibc and lib32-glibc not being found and pacman wouldn't run. I tried other things like using a hotkey to open a terminal and opening nemo, but neither worked. It was at this point I realized, I f***ed up. Now, when I boot my computer, after grub, I just get a black screen with no way to input anything.

What I've attempted:

1. I'm currently booting through a live USB trying to find a way to get things to work. I am mounting my partition to /mnt and trying to repair pacman. I've consulted this link for help: https://wiki.archlinux.org/index.php/Pacman#Pacman_crashes_during_an_upgrade and have tried the following:

mount /dev/sdaX /mnt

mount -t proc proc /mnt/proc; mount --rbind /sys /mnt/sys; mount --rbind /dev /mnt/dev

pacman --sysroot /mnt -Syu

When I do this last step, I get

error: failed retrieving file 'community.db' from : Could not resolve host:

I plugged in an ethernet cable and do have internet, as I've used ping successfully. Where I mounted, my /etc was empty, so copied pacman from the live USB onto my mounted partition to try to use it. It still didn't work, so I thought maybe I had an issue with the mirrors. I followed this link: https://wiki.archlinux.org/index.php/Mirrors After including US mirrors above the Include lines in pacman.conf, I tried running pacman -Syyu as the page mentions and it does look like things downloaded. But, I still have failures retrieving "linux-firmware-20210315...pkg.tar.zst" and "logrotate-3.18.0...pkg.tar.zst". I don't know if my mirrors are out of date or if there is another issue. After this, I've run pacman --sysroot /mnt -Syu again, but I still get

error: failed retrieving file 'community.db' from : Could not resolve host:

2. Another thing I tried was from this link: Arch GLIBC_2.33 not found errors after updating one package I mounted my partition to /mnt, then ran pacstrap /mnt glibc lib32-glibc The output of this is:

==>Creating install root at /mnt

mount: /mnt/proc: proc already mounted on /proc.

==>Error: failed to setup chroot /mnt

I am (obviously) by no means an experienced user, so I don't even know if I am remotely on the right track with either of these approaches, but I'd love your input on this issue and would be grateful for anyone's time and wisdom. I actually have 4 job interviews this week and 2 onsites coming up, so I need to reverse my dimwittedness and hope to resolve this problem before it's too late haha. Thanks!

2 Answers 2

0

The problem is that you removed the GlibC package (and while you were doing it, you deleted all it's dependencies, on which most packages depend) because some packages included in the base-devel group depend on GlibC, therefore you removed almost all packages, the only option left would be to reinstall completely.

2
  • Hi, thanks for the response! I don't recall removing the glibc package. However, I did, without thinking, remove base-devel. Would that also get rid of glibc somehow? If there is no other option, is there a way pacman or my system could have been cached,or is completely reinstalling the only way to go? I found others with the glibc issue I described and they were able to resolve it, though I haven't been able to replicate what they did. Commented Mar 24, 2021 at 2:11
  • Just to add some links of what I found regarding glibc: This person fixed it with pacstrap though I get a chroot error: [link]superuser.com/questions/1628582/… This person updated pacman, though I haven't been able to: [link]forum.manjaro.org/t/… And here are a couple others: [link]bbs.archlinux.org/viewtopic.php?pid=1956920[/link] [link]reddit.com/r/archlinux/comments/lz7777/… Commented Mar 24, 2021 at 2:16
0

I was able to solve it using the steps in this thread

The exact details are above. In summary, I did the below.

What I had to do was make a fresh live USB, mount my root partition, update my mirrors, update my broken packages using pacstrap along with base, linux, and linux-firmware (not sure if this last part was necessary or not, maybe?), then arch-chroot into my mounted root partition. Once there, I ran pacman -Syu which gave me an error due to npm. I uninstalled npm, ran pacman -Syu, and reinstalled npm and everything worked! The key for me was getting the latest version of arch on my live USB.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .