ArchLinux: problems with yay after system upgrade

Hi all, :wave:

I ran into some problems after the latest upgrade of my Arch virtual machine.

I performed my usual system upgrade:
sudo pacman -Syu
which went well. But after that my yay commands didn´t work anymore. :slightly_frowning_face:

I got the following error message:
pacman: error while loading shared libraries: libalpm.so.13: cannot open shared object file: No such file or directory.

So I looked around to see what version of libalpm was installed on my system:

ls -l /usr/lib/libalpm.so*
showed me it´s version 14: libalpm.so.14. But yay still needs version 13 of it, it seems.

So I reverted to a formerly well running state by means of a snapshot I had created formerly and saw:

arch@archlinux ~> ls -l /usr/lib/libalpm.so*
lrwxrwxrwx 1 root root     13 Feb  6 20:11 /usr/lib/libalpm.so -> libalpm.so.13*
lrwxrwxrwx 1 root root     17 Feb  6 20:11 /usr/lib/libalpm.so.13 -> libalpm.so.13.0.2*
-rwxr-xr-x 1 root root 247712 Feb  6 20:11 /usr/lib/libalpm.so.13.0.2*

Yes, yay is working that way. But as soon as I upgrade my system libalpm is upgraded to version 14 and yay stops working.
I also tried an upgrade with yay -Syu instead of sudo pacman -Syu but that way libalpm was upgraded as well, triggering the same problem.

Well, I´ve run out of ideas. Does anyone have a clue what to do to remedy the situation :question:
I have to do a system upgrade sooner or later.

Thanks in advance.
Many greetings from Rosika. :slightly_smiling_face:

The package system has let you down… it should look after
dependencies ( including versions)

It looks like yay is hard coded to require version 13.
The only way to change that is to compile yay from source code. That may be a big task.
In apt you can stop a package from upgrading beyond a given version, but I am not sure if pacman can do that. You may have to wait.
It might be possible to have both versions 13 and 14 installed.
You would have to trick the package system by taking a copy of version 13, doing the upgrade to version 14, then putting version 13 back… and maybe fixing some symbolic link.
A real fudge.

There is not much choice. You need yay to get AUR packages.

2 Likes

Hi Neville, :wave:

thanks a lot for your response to my problem.

Yes, it almost seems that way.

Oh dear; that is rather unfortunate.

O.K. But that´s an idea that hadn´t occurred to me. I´ll investigate.

Wow, seems an ambitious plan. :wink:

Yes, I need AUR packages.
But I was just taking a look at:

It looks like there are some other AUR helpers available after all… :thinking:

Thanks a lot, Neville.
Cheers from Rosika :slightly_smiling_face:

Lots of choice.
I think I would first try the one written in Rust… Paru

I wonder if you could use Guix? … it is supposed to be a general purpose package manager

1 Like

Hi Neville, :wave:

I´m really stuck here.
Any of the AUR helpers mentioned in the article need to be installed with the makepkg -si command as part of the process.

And that´s exactly the problem with me. It constantly fails:

arch@archlinux ~/E/zu_paru [1]> git clone https://aur.archlinux.org/paru.git
Cloning into 'paru'...
remote: Enumerating objects: 180, done.
remote: Counting objects: 100% (180/180), done.
remote: Compressing objects: 100% (124/124), done.
remote: Total 180 (delta 57), reused 179 (delta 56), pack-reused 0 (from 0)
Receiving objects: 100% (180/180), 55.75 KiB | 620.00 KiB/s, done.
Resolving deltas: 100% (57/57), done.
arch@archlinux ~/E/zu_paru> ll
total 0
drwxr-xr-x 1 arch arch 40 Mar 17 17:00 paru/
arch@archlinux ~/E/zu_paru> cd paru/
arch@archlinux ~/E/z/paru (master)> makepkg -si
==> ERROR: Cannot find the debugedit binary required for including source files in debug packages.

Such a shame.

Thanks anyway, Neville. :slightly_smiling_face:

P.S.:

The article doesn´t mention it. I wonder where to obtain it from?

Hi Rosika,
You need to determine which pacman package supplies
the debugedit binary. Then install it.

Guix can be installed on top of any Linux distro

I have just been reading about it myself. One can install the whole of Guix as a distro, or put its package manager (also called Guix) into any other distro.
Be careful, I am not sure it can deal wth Arch AUR.
I will try and find out

Regards
Neville

2 Likes

Thnaks Neville, :heart:

O.K., I see.

arch@archlinux ~> pacman -F debugedit
core/debugedit 5.0-5
    usr/bin/debugedit

I hadn´t taken that approach before. Thanks for the info.
It can be installed. I just checked a with a simulated installation:

arch@archlinux ~> sudo pacman -S --print debugedit
http://mirror.moson.org/arch/core/os/x86_64/debugedit-5.0-5-x86_64.pkg.tar.zst

I´ll look at it tomorrow, as I have to close for today.
Thanks also for the link.

Thanks a lot and many greetings from Rosika :slightly_smiling_face:

Hi @Rosika ,
I looked. It is obscure.
I think Guix uses its own repository… ie it cant use AUR
That might be interesting in itself, but it will probably not
help you with AUR.
Does anyone know?

1 Like

Hi Neville, :wave:

thanks for your latest comments.

I could finally solve the problem, thanks to your hint to debugedit.

Here´s what I did:

  • sudo pacman -R yay # uninstall old yay installation
  • sudo pacman -S debugedit
  • sudo pacman -S --needed git base-devel
  • git clone https://aur.archlinux.org/yay.git
  • cd yay
  • makepkg -si

(partly from: Yaourt is Dead! Use These Alternatives for AUR in Arch Linux)

It worked well and yay is getting along well with libalpm.so.14 now. Phew. :wink:

All yay commands work as expected again. :wink:

It took me quite a while to deal with the libalpm issue.
My internet research led me to believe that debugedit was part of the elfutils package.
Perhaps it was at some time but apparently it isn´t anymore.
I installed elfutils but libalpm was still misssing.

@nevj´s hinting to it saved the day. Thanks a lot, Neville. :heart:

Many greetings from Rosika :slightly_smiling_face:

P.S.:

Thanks for your comments on Guix.

2 Likes

Hi Rosika,

OK, if I understand correctly, to upgrade yay (or install paru) you needed makpkg to work,
and that only worked after you installed debugedit. Correct?
Is this the first time you used AUR? It seems
makepkg needs to work to be able to user AUR? Is that the bottom line?

I am going to have to repeat your learning curve with Artix. Now I have a head start.
Thanks.

I think you own the solution, not me.

Regards
Neville

PS Now that you have yay working, could you do a few examples of its usage.
I tried in Artix. Your procedure worked and I got yay installed.
I tried yay -Syu and it told me not to use yay as root, and said there was nothing to do… not surprising… all my installs are from pacman not AUR.55

Things I dont understand

  • how do I browse AUR
  • why not use yay as root?
  • what happens if I install a package from AUR with yay… does it go into the same directories as official pacman packages?
  • if I have a mix of official packages and AUR packages, how do I do an update
  • are any packages in both the official repo and AUR
    Sorry, too many questions
2 Likes

Hi Neville, :wave:

sorry that I couldn´t reply earlier, as I wasn´t online yesterday. :bowing_man:

Yes, it seems that´s what it comes down to.

Yes, you do, Neville. It was your comment that led me in the right direction.
I needed to install debugedit.

I have used AUR a few times. I mainly needed it fior installing anydesk. The pacman commands wouldn´t cover it.

But it was the first time that (the new version of) yay needed the newer version libalpm.so.14.

I also use yay without sudo.
I just looked at my command history in order to verify it. Unlike pacman yay doesn´t need to be executed as root. I don´t know why that is.

I fear I don´t quite understand. What do you mean by “browsing” :question:

Hmm, I´ve been doing it this way:

  • pacman -Syu for the official packages
  • yay for AUR packages.

Although I´m not quite sure whether the first one (pacman) is necessary at all it you use yay.

As a reference of yay commands I use this site: yay man | Linux Command Library .
Here it says:

Synchronize and update all packages from the repos and AUR
$ yay

… which seems to cover both repositories, right?
I may be wrong. :thinking:

As for your other questions, I´ll have to investigate.

Many greetings from Rosika :slightly_smiling_face:

1 Like

It seems so.

I suppose I would like to have some sense of what kinds of things are in AUR… and I suppose the answer is everything that is not in the official repo.?
Void has a website where you can search the package repo
Something like that would be what I had in mind.

Use “yay -Ss packagename” to search for packages or “yay -S packagename” to install packages. You can also use "yay -Syu to update the system. You used to be able to edit /etc/pacman.conf and add AUR to the repository list. I tried but it need not work, something about the URL, out of France, was not working.

2 Likes

I´ve come up with this page: AUR (en) - Packages .

91099 packages found
1822 sub-pages

Cheers from Rosika :slightly_smiling_face:

P.S.:

According to ChatGPT:

The reason you don’t need to use sudo with yay to install packages is because yay itself handles the necessary permissions internally.

When you run yay, it automatically detects whether administrative privileges are required for the operation you’re performing. If administrative privileges are necessary (for example, when installing or removing packages), yay will prompt you for your password and then execute the operation with elevated privileges.

This behavior is similar to how sudo works, but it’s handled transparently by yay, so you don’t need to manually prepend commands with sudo. yay takes care of requesting the necessary permissions when needed, simplifying the package management process.

However, it’s important to note that yay still performs administrative tasks, and it’s essential to trust the packages you’re installing from the AUR. Always review package details, comments, and user feedback before installing packages to ensure they’re safe and appropriate for your system.

P.S.2:

Again, I contacted ChatGPT:

Yes, when you install a package from the Arch User Repository (AUR) using yay, the installed files typically go into the same system directories as packages installed from the official Arch Linux repositories using pacman.

When you install a package using yay, it retrieves the package source code from the AUR, compiles it (if necessary), and then installs the resulting package onto your system. The installation process is similar to installing packages from the official repositories.

By default, most packages installed via yay will install their files into the appropriate system directories, such as /usr/bin, /usr/lib, /etc, and so on. This ensures that the installed software integrates seamlessly with your system, just like packages installed from the official repositories.

It’s worth noting that some AUR packages may have custom installation instructions that specify different installation paths or require additional configuration steps. In such cases, yay will handle these instructions during the installation process.

Overall, yay ensures that packages from the AUR are installed properly and integrated into your system alongside packages from the official repositories.

P.S.3:

Once again ChatGPT helped with the answer:

Yes, it’s possible for packages to exist in both the official Arch Linux repositories and the Arch User Repository (AUR). This can happen for several reasons:

Community contributions:

Sometimes, packages that are available in the official repositories are also maintained by community members in the AUR. These community-maintained versions may offer additional features, customizations, or updates that aren’t present in the official package.

Variations or forks:

Occasionally, community members create variations or forks of packages available in the official repositories. These variations may include modifications, patches, or customizations that cater to specific use cases or preferences.

Testing and development:

Developers may use the AUR to distribute testing or development versions of packages before they are officially added to the Arch Linux repositories. This allows users to try out bleeding-edge features or contribute feedback before the package is considered stable enough for inclusion in the official repositories.

Package availability:

In some cases, packages may be removed from the official repositories due to policy changes, licensing issues, or other reasons. In such cases, community members may continue to maintain the package in the AUR, ensuring that it remains available to users who still want to use it.

While it’s less common for packages to exist in both the official repositories and the AUR, it’s not uncommon to find overlap between the two. When deciding which version of a package to install, it’s essential to consider factors such as package maintenance, stability, and community support.

2 Likes

Hi Rosika,
https://aur.archlinux.org/packages
That is what I was looking for
and
Thank you for the ChatGPT explanations.
I think I understand how yay works now.
I dont feel comfortable using black boxes.

AUR packages can be source code and need compiling.
So it is a bit like Gentoo

Regards
Neville

1 Like

That is true to a certain extent, yay just takes the element of having to install a package using the source-code. Take for instance the “aisleriot solitare package”!!! It does not show-up in the pacman repositories but a “yay -Ss aisleriot” shows the package within the community-driven AUR, so a “yay -S aisleriot” will indeed install the package, with all of Arch, warning otherwise.
This is why Arch does not activate AUR by default, you install at your own risk of bricking Arch!!!
It is always best to try and find packages within the pacman repositories, if one wants to keep Arch running.
There are other AUR helpers, besides yay.

3 Likes

Yes that is my feeling.
Especially stay away from system packages in AUR.
The odd app package could probably be safe.
If you want to risk bricking Arch, do it in VM where you can use snapshots to recover.

1 Like

It seems like you guys have already managed to work this out, but just in case you don’t want to install debugedit:

What worked for me when I got that error (like 20 minutes ago) was uninstalling yay using sudo pacman -Rns yay, then re-git clone-ing and rebuilding it like I was installing it for the first time.

Figured I’d share. Hope that’s useful

5 Likes

Hi @Random_Guy ,
That probably worked by dragging in all the needed dependencies.
Welcome to itsFOSS
Regards
Neville

1 Like

Hi Neville, :wave:

you´re welcome.
I´m glad you found the information useful.

It took me some time too to figure out (at least some of the) pacman and yay commands.
All that is prettey new to me. :wink:

Cheers from Rosika :slightly_smiling_face:

2 Likes