Can't resolve dependency for libelf, prevents system upgrade
Error while updating in update manager - [failed to satisfy dependency removing: lib32-libelf breaks the "lib32-libelf" dependency needed by lib32-mesa]
Cannot install lib32-libelf
Installing libelf (0.185-1) breaks dependency 'libelf=0.184' - Newbies - Garuda Linux Forum
Trying to install valgrind
sudo pacman -S valgrind
Also tried on yay.
yay -S valgrind
Getting following output:
resolving dependencies... looking for conflicting packages... error: failed to prepare transaction (could not satisfy dependencies) :: installing libelf (0.187-1) breaks dependency 'libelf=0.186-5' required by elfutils :: installing libelf (0.187-1) breaks dependency 'libelf=0.186' required by lib32-libelf
Only found two forum posts online about this. One suggested that I needed to "check use mirror status", which I googled and am not sure what that means or how to do it. The other suggested that I needed to enable multilib repos.
As far as I can tell with my pacman.conf, I have already enabled multilib repos.
# # /etc/pacman.conf # # See the pacman.conf(5) manpage for option and repository directives # # GENERAL OPTIONS # [options] # The following paths are commented out with their default values listed. # If you wish to use different paths, uncomment and update the paths. #RootDir = / #DBPath = /var/lib/pacman/ #CacheDir = /var/cache/pacman/pkg/ #LogFile = /var/log/pacman.log #GPGDir = /etc/pacman.d/gnupg/ #HookDir = /etc/pacman.d/hooks/ HoldPkg = pacman glibc #XferCommand = /usr/bin/curl -L -C - -f -o %o %u #XferCommand = /usr/bin/wget --passive-ftp -c -O %o %u #CleanMethod = KeepInstalled Architecture = auto # Pacman won't upgrade packages listed in IgnorePkg and members of IgnoreGroup #IgnorePkg = #IgnoreGroup = #NoUpgrade = #NoExtract = # Misc options #UseSyslog Color #NoProgressBar CheckSpace #VerbosePkgLists ParallelDownloads = 5 # By default, pacman accepts packages signed by keys that its local keyring # trusts (see pacman-key and its man page), as well as unsigned packages. SigLevel = Required DatabaseOptional LocalFileSigLevel = Optional #RemoteFileSigLevel = Required # NOTE: You must run `pacman-key --init` before first using pacman; the local # keyring can then be populated with the keys of all official Arch Linux # packagers with `pacman-key --populate archlinux`. # # REPOSITORIES # - can be defined here or included from another file # - pacman will search repositories in the order defined here # - local/custom mirrors can be added here or in separate files # - repositories listed first will take precedence when packages # have identical names, regardless of version number # - URLs will have $repo replaced by the name of the current repo # - URLs will have $arch replaced by the name of the architecture # # Repository entries are of the format: # [repo-name] # Server = ServerName # Include = IncludePath # # The header [repo-name] is crucial - it must be present and # uncommented to enable the repo. # # The testing repositories are disabled by default. To enable, uncomment the # repo name header and Include lines. You can add preferred servers immediately # after the header, and they will be used before the default mirrors. #[testing] #Include = /etc/pacman.d/mirrorlist [core] Include = /etc/pacman.d/mirrorlist [extra] Include = /etc/pacman.d/mirrorlist [community-testing] Include = /etc/pacman.d/mirrorlist [community] Include = /etc/pacman.d/mirrorlist # If you want to run 32 bit applications on your x86_64 system, # enable the multilib repositories as required here. [multilib-testing] Include = /etc/pacman.d/mirrorlist [multilib] Include = /etc/pacman.d/mirrorlist # An example of a custom package repository. See the pacman manpage for # tips on creating your own repositories. #[custom] #SigLevel = Optional TrustAll #Server = file:///home/custompkgs
kernel: 5.16.13-arch1-1
laptop: Asus M16 GU603
Install libelf-dev and elfutils package. If you are using Ubuntu or any Debian variant then use the following command to install them.
sudo apt install libelf-dev
This turns out to be another dimension of the problem reported here but in an earlier kernel.
The solution is the same - but in addition to squelching PKG_CONFIG_PATH in tools/objtool/Makefile it is also necessary to do it in the kernel's toplevel Makefile:
-HOST_LIBELF_LIBS = $(shell pkg-config libelf --libs 2>/dev/null || echo -lelf)
+HOST_LIBELF_LIBS = $(shell PKG_CONFIG_PATH= pkg-config libelf --libs 2>/dev/null || echo -lelf)
Setup: Artix OpenRC XFCE with Arch repos enabled
Running pacman -Syu results in this error:
Edit: Waiting a day for libelf to be updated to 0.186 fixed the problem.
warning: cannot resolve "libelf=0.186", a dependency of "lib32-libelf"
:: The following package cannot be upgraded due to unresolvable dependencies:
lib32-libelf
:: Do you want to skip the above package for this upgrade? [y/N]
error: failed to prepare transaction (could not satisfy dependencies)
:: unable to satisfy dependency 'libelf=0.186' required by lib32-libelf
installing lib32-libelf (0.183-3) breaks dependency 'lib32-elfutils' required by lib32-mesa-git
Any suggestions,
Thank you.
Lib32-mesa-git has dependency for a package that hasn't existed in around a decade, but until today lib32-libelf has been saying it provides it. Then, lib32-mesa-git 's maintainer no longer uses the package, so may be slow to update the git package.
Do you need the git version of mesa? If so, update the dependencies in the pkgbuild and reinstall. Otherwise, change to the repo version
So, I asked about this yesterday. You've got one of the three testing repos activated and you need either all 3 or none. I'll link the comment I read that better explains it.
https://www.reddit.com/r/archlinux/comments/litsxj/warning_cannot_resolve_libelf0183/gn56yi4?utm_source=share&utm_medium=web2x&context=3