Cannot install elfutils-libelf-devel-static

Hi everyone!

I need to install elfutils-libelf-devel-static because it provides a file I need for compiling a bpf program. The file is libelf.a. I see that this file is provided by elfutils-libelf-devel-static but running the following command:

[VM] sudo dnf install elfutils-libelf-devel-static
Last metadata expiration check: 0:30:35 ago on Thu 11 Feb 2021 02:20:34 PM UTC.
No match for argument: elfutils-libelf-devel-static
Error: Unable to find a match: elfutils-libelf-devel-static

I’ve also tried:

[VM] sudo dnf install                         1 ↵
Last metadata expiration check: 0:31:13 ago on Thu 11 Feb 2021 02:20:34 PM UTC.
elfutils-libelf-devel-static-0.179-1.fc32.x86_64.rpm                                                                                                                         81 kB/s |  80 kB     00:00
 Problem: conflicting requests
  - nothing provides elfutils-libelf-devel(x86-64) = 0.179-1.fc32 needed by elfutils-libelf-devel-static-0.179-1.fc32.x86_64
(try to add '--skip-broken' to skip uninstallable packages)

I do have elfutils-libelf-devel-0.182-1.fc33.x86_6 installed.

[VM] uname -r                                                                                                                                                                                         127 ↵
1 Like

Sorry, but this package is not available in :fedora: 33 anymore is was present in :fedora: 32 for installing it.


  • Wed Jul 22 2020 - 0.180-5
  • Remove elfutils-libelf-devel-static and elfutils-devel-static subpackages.


but I think you need both:

sudo dnf install

and then:

sudo dnf install



Look at

There is says

elfutils-libelf-devel-static < 0.180-5
libelf-devel <= 0.8.2-2

So what you want to do is install elfutils-libelf-devel, it provides the files listed here, see if the .gz contain what you are looking for…


According to the spec file for Fedora 33, elfutils-libelf-devel does not provide libelf.a. Looks like static libraries are removed with this commit altogether:


Thanks for the reply! I upgraded my system to rawhide and pulled in that package but no libelf.a file was provided. So strange that it was removed, i’m going to have to build with an ubuntu container now.

Thanks for the reply! Unfortunately trying to downgrade all the dependencies of the package broke the build in a different way :confused:

1 Like

libelf.a would be an intermediate file created during compile.

Why does it have to be a static file?
/usr/lib64/ is provided by elfutils-libelf-devel

You are also running the very base level of kernel in F33

You could add elfutils-libelf-devel(x86-64) = 0.179-1.fc32 to that last dnf install command where you tried to install the static library, and do both at the same time.

Need the static file for statically compiling a Go program with CGO enabled.

I ended up not being able to install libelf.a from any package (tried rawhide, and backtracking to f32), and instead just build elfutils/libelf from source which worked just fine.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.