Ah, I see the problem there. I should have connected the dots on this much, much sooner.
If you take a look at the output of
ldd
in your post. The linker has set up the executable to use a symbolic link at
/lib/ld64.so.1
, which points to
/lib64/ld-linux-x86-64.so.2
.
But
/lib/
doesn't contain a symbolic link with that name. So at runtime, during the setup stage, your program is failing to load the library and is throwing an error message.
So the fix for this is actually mind-numbingly simple.
You need to create an appropriately named symbolic link in
/lib/
, which points to
/lib64/ld-linux-x86-64.so.2
. And because it's in
/lib/
, you'll need to create the symbolic link as root.
e.g.
Bash:
sudo ln -sT /lib/64/ld-linux-x86-64.so.2 /lib/ld64.so.1
That will create a symbolic link called
ld64.so.1
, which will point to the
ld-linux-x86-64.so.2
shared object.
Run your program again and it should work!
I've verified this on my machine.