I have installed
f30 about 4 weeks ago and I keep encountering this error when compiling
c++ macros or trying to install programs that require a compilation of a source code in
error: ld returned 126 exit status
I’ve tried to look into it and so far I have no explanation.
What I tried to is to find where is
ld and see if I can find something. So,
ld resides in
/usr/bin which is a soft link from
$ ls -al /usr/bin/ld* lrwxrwxrwx. 1 root root 20 Apr 26 04:27 /usr/bin/ld -> /etc/alternatives/ld -rwxr-xr-x. 1 root root 13536 Aug 11 11:27 /usr/bin/ld.bfd -rwxr-xr-x. 1 root root 5441 Jun 6 13:55 /usr/bin/ldd -rwxr-xr-x. 1 root root 3853632 Mar 6 11:00 /usr/bin/ld.gold
When I try to execute
ld by itself, I get the following error
$ /usr/bin/ld bash: /usr/bin/ld: cannot execute binary file: Exec format error $ sudo /usr/bin/ld /usr/bin/ld: /usr/bin/ld: cannot execute binary file
Then I searched the original
/etc/alternatives location, but it’s again a soft link to the orignial one!
$ ls -al /etc/alternatives/ld* lrwxrwxrwx. 1 root root 15 Apr 26 04:27 /etc/alternatives/ld -> /usr/bin/ld.bfd
I tried to find the version of
ld.bfd but it seems that it cannot be executed
$ /usr/bin/ld.bfd --version bash: /usr/bin/ld.bfd: cannot execute binary file: Exec format error $ sudo /usr/bin/ld.bfd --version /usr/bin/ld.bfd: /usr/bin/ld.bfd: cannot execute binary file
Any idea on how to understand what is wrong and solve the issue?