0

I am trying to run Scala on my Linux Manjaro laptop, but whenever I try to run the program, it displays the following error:

./scala: error while loading shared libraries: libgtkada.so.2.24.4: cannot open shared object file: No such file or directory

However, I have verified that the shared object file in question is present in /usr/lib. I have tried running ldconfig as root, but that did not resolve the problem. When I run ldd scala, the relevant output I receive is:

...
libgtkada.so.2.24.4 => not found
...

This makes no sense to me, since libgtkada.so.2.24.4 is present in my /usr/lib folder. What should I do to resolve this problem?

EDIT: The output of strace ./scala is as follows:

execve("./scala", ["./scala"], 0x7ffd5332dbc0 /* 23 vars */) = 0
strace: [ Process PID=7780 runs in 32 bit mode. ]
brk(NULL)                               = 0x98b7000
mmap2(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xf7726000
access("/etc/ld.so.preload", R_OK)      = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=319201, ...}) = 0
mmap2(NULL, 319201, PROT_READ, MAP_PRIVATE, 3, 0) = 0xf76d8000
close(3)                                = 0
open("/usr/lib32/tls/i686/sse2/libgtkada.so.2.24.4", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat64("/usr/lib32/tls/i686/sse2", 0xffbe4c20) = -1 ENOENT (No such file or directory)
open("/usr/lib32/tls/i686/libgtkada.so.2.24.4", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat64("/usr/lib32/tls/i686", 0xffbe4c20) = -1 ENOENT (No such file or directory)
open("/usr/lib32/tls/sse2/libgtkada.so.2.24.4", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat64("/usr/lib32/tls/sse2", 0xffbe4c20) = -1 ENOENT (No such file or directory)
open("/usr/lib32/tls/libgtkada.so.2.24.4", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat64("/usr/lib32/tls", 0xffbe4c20)    = -1 ENOENT (No such file or directory)
open("/usr/lib32/i686/sse2/libgtkada.so.2.24.4", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat64("/usr/lib32/i686/sse2", 0xffbe4c20) = -1 ENOENT (No such file or directory)
open("/usr/lib32/i686/libgtkada.so.2.24.4", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat64("/usr/lib32/i686", 0xffbe4c20)   = -1 ENOENT (No such file or directory)
open("/usr/lib32/sse2/libgtkada.so.2.24.4", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat64("/usr/lib32/sse2", 0xffbe4c20)   = -1 ENOENT (No such file or directory)
open("/usr/lib32/libgtkada.so.2.24.4", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat64("/usr/lib32", {st_mode=S_IFDIR|0755, st_size=49152, ...}) = 0
writev(2, [{iov_base="./scala", iov_len=7}, {iov_base=": ", iov_len=2}, {iov_base="error while loading shared libra"..., iov_len=36}, {iov_base=": ", iov_len=2}, {iov_base="libgtkada.so.2.24.4", iov_len=19}, {iov_base=": ", iov_len=2}, {iov_base="cannot open shared object file", iov_len=30}, {iov_base=": ", iov_len=2}, {iov_base="No such file or directory", iov_len=25}, {iov_base="\n", iov_len=1}], 10./scala: error while loading shared libraries: libgtkada.so.2.24.4: cannot open shared object file: No such file or directory
) = 126
exit_group(127)                         = ?
+++ exited with 127 +++
alex@laptop ~/S/scala-

Running echo $LD_LIBRARY_PATH produces no output. Is that normal?

  • paste your LD_LIBRARY_PATH – rajaganesh87 Jul 20 '17 at 16:36
  • Or show (via strace or the like) what files ./scala is attempting to read. – thrig Jul 20 '17 at 16:38
  • Note the strace is showing it is trying to load from /usr/lib32 rather than lib. Is this a 32 or 64 bit system? – icarus Jul 20 '17 at 17:05
  • 3
    /usr/lib32 looks like a 32-bit version of the library is being looked for. Perhaps install that, or rebuild as 64-bit? – thrig Jul 20 '17 at 17:06
  • 3
    Looks like a 32/64-bit mismatch to me. The library is present in /use/lib, but scala is trying to locate it in /use/lib32. – Johan Myréen Jul 20 '17 at 17:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.