0

I have an image mounted in the following way in fstab:

/home/fbence/ee_modbox.img /home/fbence/mounted/modbox lowntfs-3g windows_names,ignore_case,umask=007,uid=fbence 0 0

In a specific folder on the mounted image I have the following files with the following permissions:

fbence@localhost:~/mounted/modbox/bg2ee/game$ ls -l
total 38239
-rwxrwx--- 1 fbence root 11774908 dec   19  2017 baldursgateii
drwxrwx--- 1 fbence root     4096 dec   19  2017 characters
-rwxrwx--- 1 fbence root  1154176 dec   19  2017 chitin.key
drwxrwx--- 1 fbence root    57344 dec   19  2017 data
drwxrwx--- 1 fbence root     4096 jan   27  2018 eet
-rwxrwx--- 1 fbence root    29271 dec   19  2017 eet_end.tp2
-rwxrwx--- 1 fbence root      162 dec   19  2017 eet_gui.tp2
drwxrwx--- 1 fbence root     4096 dec   19  2017 eet_tweaks
-rwxrwx--- 1 fbence root      109 dec   19  2017 engine.lua
drwxrwx--- 1 fbence root        0 dec   19  2017 lang
lrwxrwxrwx 1 fbence root       14 nov    3 23:44 libjson.so.0 -> libjson-c.so.2
-rwxrwx--- 1 fbence root      255 jan   27  2018 list.txt
drwxrwx--- 1 fbence root        0 dec   19  2017 manuals
drwxrwx--- 1 fbence root     4096 dec   19  2017 movies
drwxrwx--- 1 fbence root    53248 dec   19  2017 music
drwxrwx--- 1 fbence root  3072000 jan   27  2018 override
drwxrwx--- 1 fbence root     4096 dec   19  2017 scripts
-rwxrwx--- 1 fbence root 17548975 dec   19  2017 setup-eet.debug
-rwxrwx--- 1 fbence root  1028264 dec   19  2017 setup-eet_end
-rwxrwx--- 1 fbence root  1028264 dec   19  2017 setup-eet_gui
-rwxrwx--- 1 fbence root  3361726 jan   27  2018 setup-eet_tweaks.debug
-rwxrwx--- 1 fbence root     3950 dec   19  2017 weidu-bgee.log
-rwxrwx--- 1 fbence root       17 dec   19  2017 weidu.conf
-rwxrwx--- 1 fbence root     1879 jan   27  2018 weidu.log
drwxrwx--- 1 fbence root        0 dec   19  2017 worldmap

When I try to execute the baldursgateii executable I get an error, and I totally can't understand how I can be getting this error:

fbence@localhost:~/mounted/modbox/bg2ee/game$ ./baldursgateii 
bash: ./baldursgateii: No such file or directory

The image and the setup was copied from another computer running the same Ubuntu 18.04 as the current computer. The file is clearly there, I actually use the bash tab autocomplete to type the filename yet it still says there's no such file ... What is wrong here?

EDIT

fbence@localhost:~/mounted/modbox/bg2ee/game$ ldd baldursgateii 
    not a dynamic executable
fbence
  • 274

1 Answers1

2

When a file that you know to be a binary executable fails to run, with a No such file or directory message, it's often because of issues with shared libraries.

In some cases, it's because one or more shared libraries is missing. Running

ldd ./baldursgateii

(for example) should help identify which one(s). On the other hand, if ldd itself fails with the unhelpful (and incorrect) message

not a dynamic executable

then that's likely a sign that you are trying to run a 32-bit executable on a system that lacks even the 32-bit dynamic loader, as discussed in ldd 32-bit exe / 64-bit OS

To obtain the missing 32-bit loader in a current multiarch 64-bit system, you should install the libc6-i386 package:

sudo apt install libc6-i386 

From apt show libc6-i386:

Description: GNU C Library: 32-bit shared libraries for AMD64 This package includes shared versions of the standard C library and the standard math library, as well as many others. This is the 32bit version of the library, meant for AMD64 systems.

As well as the 32-bit loader, this installs a minimal set of 32-bit libraries: if the program still does not execute, run ldd ./baldursgateii again to check for other specific unmet library dependencies.

steeldriver
  • 142,475