You are not logged in.

#1 2021-03-23 22:30:24

Qhapaq Qowi
Member
Registered: 2021-03-23
Posts: 7

[SOLVED] No longer booting due to package issues - glibc, base-devel

Hi everyone, this is my first post and I'll be upfront, I did something quite imbecilic. I'm also am a noob in more ways than one. I'll detail what happened and what I've attempted. Please feel free to let me know how I can improve this post and make everyone's life easier.
After having some pacman issues, I am no longer able to boot into my arch linux system after 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/Pa … 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 <mirror>: Could not resolve host: <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 <mirror>: Could not resolve host: <host>



2) Another thing I tried was from this link: https://superuser.com/questions/1628582 … ne-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.
==>ErrorL 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!

Last edited by Qhapaq Qowi (2021-03-25 21:23:47)

Offline

#2 2021-03-24 08:17:55

incandenza
Member
Registered: 2020-02-19
Posts: 4

Re: [SOLVED] No longer booting due to package issues - glibc, base-devel

same here!!! since 20210322 but, in my case restoring at 20210319 everything return to work

I bypassed the problem following these instructions (but the problem in updating still remains also after today's pacman update):
https://wiki.archlinux.org/index.php/Ar … cific_date

Last edited by incandenza (2021-03-24 08:43:43)

Offline

#3 2021-03-24 17:50:16

xerxes_
Member
Registered: 2018-04-29
Posts: 353

Re: [SOLVED] No longer booting due to package issues - glibc, base-devel

You may use pacman-static which don't have external dependencies:
https://aur.archlinux.org/packages/pacm … ned-666894
and use it from usb arch-boot. If you resolving DNS don't work, use dhcpcd command with ethernet.

Last edited by xerxes_ (2021-03-24 17:51:39)

Offline

#4 2021-03-24 19:06:08

Qhapaq Qowi
Member
Registered: 2021-03-23
Posts: 7

Re: [SOLVED] No longer booting due to package issues - glibc, base-devel

Hi xerxes_ and incandenza, thanks so much for the replies!


incandenza wrote:

same here!!! since 20210322 but, in my case restoring at 20210319 everything return to work

I bypassed the problem following these instructions (but the problem in updating still remains also after today's pacman update):
https://wiki.archlinux.org/index.php/Ar … cific_date

Thanks for the link. I tried using that method, but after adding the SigLevel and server with a recent date (I chose 2021/03/10), it looks as though most things update fine, but at the end, I get an error retrieving linux-firmware-20210315...pkg.tar.zst and logrotate-3.18.0...plg.tar.zst


xerxes_ wrote:

You may use pacman-static which don't have external dependencies:
https://aur.archlinux.org/packages/pacm … ned-666894
and use it from usb arch-boot. If you resolving DNS don't work, use dhcpcd command with ethernet.

I do have a live USB with Arch on it, but I have never before added anything else to that USB. How can get pacman-static on it, if all I have is my USB and someone else's windows computer I am borrowing to investigate/respond?

Last edited by Qhapaq Qowi (2021-03-24 19:32:36)

Offline

#5 2021-03-24 21:41:35

xerxes_
Member
Registered: 2018-04-29
Posts: 353

Re: [SOLVED] No longer booting due to package issues - glibc, base-devel

Just start live Arch USB and download pacman-static from the link by wget or curl:

wget https://pkgbuild.com/~eschwartz/repo/x86_64-extracted/pacman-static

Link in not so long, so you can write it on paper and rewrite it on console. On USB should be also some text web browser, like lynx, links, elinks, etc.

Or you can just download it on windows and copy to USB stick even somewhere in the root directory. Then, when you start live USB, it can be copied elsewhere, to /usr/bin/ and run. First method would be easier.

Offline

#6 2021-03-24 23:48:15

Qhapaq Qowi
Member
Registered: 2021-03-23
Posts: 7

Re: [SOLVED] No longer booting due to package issues - glibc, base-devel

Thank you for that. I tried the wget and it downloaded successfully. However, I'm having trouble running it and wasn't able to find documentation on how to do so. I tried

pacman-static base-devel

,

./pacman-static base-devel

, and other variants, but wasn't able to get it to run.

Offline

#7 2021-03-25 00:27:15

eschwartz
Trusted User/Bug Wrangler
Registered: 2014-08-08
Posts: 3,995

Re: [SOLVED] No longer booting due to package issues - glibc, base-devel

Since you've previously mentioned

sudo pacman -R base-devel

and

sudo pacman -S php

I'm sure it should come as no surprise that pacman-static works like this:

sudo ./pacman-static -S base-devel
Qhapaq Qowi wrote:

However, I'm having trouble running it and wasn't able to find documentation on how to do so.

It is *literally* pacman. All pacman documentation is applicable. If the name is throwing you off, then

mv pacman-static pacman

sudo ./pacman -S base-devel

Last edited by eschwartz (2021-03-25 00:29:22)


Managing AUR repos The Right Way -- aurpublish (now a standalone tool)

Offline

#8 2021-03-25 01:51:38

Qhapaq Qowi
Member
Registered: 2021-03-23
Posts: 7

Re: [SOLVED] No longer booting due to package issues - glibc, base-devel

Hi eschwartz, I appreciate the response. It sounded like I almost gave you an ulcer haha, apologies for that. I think I mistyped and forgot the -S when writing the reply. When in /mnt, I've tried

sudo ./pacman-static -S base-devel

, but the output is sudo: ./pacman-static: command not found. I got pacman-static using wget as xerxes_ mentioned and do see the file "pacman-static" in my /mnt directory, so it looks like something else is wrong other than syntax. Sorry if it's something obvious.

Last edited by Qhapaq Qowi (2021-03-25 01:53:20)

Offline

#9 2021-03-25 03:15:34

eschwartz
Trusted User/Bug Wrangler
Registered: 2014-08-08
Posts: 3,995

Re: [SOLVED] No longer booting due to package issues - glibc, base-devel

Qhapaq Qowi wrote:

Hi eschwartz, I appreciate the response. It sounded like I almost gave you an ulcer haha, apologies for that. I think I mistyped and forgot the -S when writing the reply.

No ulcers, but several raised eyebrows. big_smile

Qhapaq Qowi wrote:

When in /mnt, I've tried

sudo ./pacman-static -S base-devel

, but the output is sudo: ./pacman-static: command not found. I got pacman-static using wget as xerxes_ mentioned and do see the file "pacman-static" in my /mnt directory, so it looks like something else is wrong other than syntax. Sorry if it's something obvious.

Okay, here is a very relevant error message. Now I know that you didn't get "error: no operation specified (use -h for help)" due to typing in the wrong arguments. wink

command not found indicates a problem getting the binary to even load at all. The error message is coming from sudo, though.

$ ./pacman-static --help
bash: ./pacman-static: Permission denied
$ sudo ./pacman-static --help
sudo: ./pacman-static: command not found

Problem: sudo claims the command isn't found at all, bash gives a slightly better error message: it got found all right, but, you don't have permission to execute it as a program.

I received this error message when I copied over the binary (I did not download it because it is already on my machine as I am the one who uploaded it...) and did

chmod -x ./pacman-static

This emulates the default behavior of file download programs, which is that they don't download random files as executable. You probably forgot to chmod +x before running it. big_smile

Simple, easily solved problem, but it's an easy oversight to forget and the error message from sudo does NOT make it obvious what the problem is.


Managing AUR repos The Right Way -- aurpublish (now a standalone tool)

Offline

#10 2021-03-25 04:25:34

Qhapaq Qowi
Member
Registered: 2021-03-23
Posts: 7

Re: [SOLVED] No longer booting due to package issues - glibc, base-devel

chmod +x

This did the trick to an extent. It gave me the prompt to download the 24 members of the base-devel group. However, when accessing the mirrors, all of them fail either with: Failure writing to output destination or expected download size exceeded. Any ideas here? I feel like I've tried so many different things, I don't know if I just need to reinstall or if it's still salvageable. I already cancelled 5 interviews this week and am starting to feel some pressure haha.

Offline

#11 2021-03-25 07:48:17

incandenza
Member
Registered: 2020-02-19
Posts: 4

Re: [SOLVED] No longer booting due to package issues - glibc, base-devel

From my side the problem has been fixed with today's update
for me the issue is SOLVED

Offline

#12 2021-03-25 08:46:52

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 12,505

Re: [SOLVED] No longer booting due to package issues - glibc, base-devel

Which mirrors are you actually using?  You want something from this list and with a low score as these are the ones that synchronize the best.

Offline

#13 2021-03-25 18:29:19

Qhapaq Qowi
Member
Registered: 2021-03-23
Posts: 7

Re: [SOLVED] No longer booting due to package issues - glibc, base-devel

V1del wrote:

Which mirrors are you actually using?  You want something from this list and with a low score as these are the ones that synchronize the best.

Thanks for the list. I added a few under [core], [extra], [community], and [multilib], then ran

sudo ./pacman-static -S base-devel

  I get an error error: key <key from David Runge> could not be looked up remotely. and it fails to commit the transaction. I cannot update arch-keyring due to an invalid or corrupted package (PGP signature).

Offline

#14 2021-03-25 21:15:51

Qhapaq Qowi
Member
Registered: 2021-03-23
Posts: 7

Re: [SOLVED] No longer booting due to package issues - glibc, base-devel

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.

Thanks so much everyone for your time and all the help you've been!

Offline

Board footer

Powered by FluxBB