project-navigation
Personal tools

Author Topic: Can't start UFO on Kubuntu x86_64 (error while loading shared libraries libcurl)  (Read 15629 times)

Offline booTheHamster

  • Cannon Fodder
  • **
  • Posts: 3
    • View Profile
System: Kubuntu 7.10, x86_64.
I install UFO:AI from ufoai-2.2-linux.run. Then I try to start UFO:AI, and get error "./ufo: error while loading shared libraries: libcurl.so.4: cannot open shared object file: No such file or directory".

@ls -l /usr/lib/libcurl*

/usr/lib/libcurl-gnutls.so.3 -> libcurl-gnutls.so.4
/usr/lib/libcurl-gnutls.so.4 -> libcurl-gnutls.so.4.0.0
/usr/lib/libcurl-gnutls.so.4.0.0
/usr/lib/libcurl.so.3 -> libcurl.so.4
/usr/lib/libcurl.so.4 -> libcurl.so.4.0.0
/usr/lib/libcurl.so.4.0.0

@ls -l /lib/libcurl*

/lib/libcurl.so.4 -> /usr/lib/libcurl.so.4

What I can to do to run UFO:AI

canahari

  • Guest
Huh, I can't follow this; your /lib/libcurl.so.4 file is a link to /usr/lib/libcurl.so.4 file which is a symlink to /usr/lib/libcurl.so.4.0.0... I guess it will be some trouble with these links...

For me a symlink from /usr/lib/libcurl.so.3 /usr/lib/libcurl.so.4 worked. Maybe you'd try it (after SAVING of course)

Offline booTheHamster

  • Cannon Fodder
  • **
  • Posts: 3
    • View Profile
I found solution. Make symbolic link from /lib/lib64/libcurl.so.4 to /usr/lib/libcurl.so.4 for x86_64 systems.

@sudo ln -s /usr/lib/libcurl.so.4 /lib/lib64/libcurl.so.4

Then I found a bug: game installator install 'ufo.x86_64' binary, but trying to run 'ufo' binary, and get "/home/boo/bin/ufoai: line 124: ./ufo: No such file or directory" error. I think that error in ufoai script.

stedly

  • Guest
Im having the same problem, but im on 32 bit Kubuntu, how do I solve this?

stedly

  • Guest
~/ufoai$ ./ufoai

./ufo: error while loading shared libraries: libcurl.so.4: cannot open shared object file: No such file or directory

Offline Mattn

  • Administrator
  • PHALANX Commander
  • *****
  • Posts: 4831
  • https://github.com/mgerhardy/vengi
    • View Profile
    • Vengi Voxel Tools
in general the same - make a symlink to your .3 version

stedly

  • Guest
Did that it worked, but then I had an older Glibc version,(glibc_2.3) so instead Im upgrading my Ubuntu installation. 

Funny thing was I overlooked at what you guys were talking about, and didn't create a symlink to fix it.  Then I looked at the posts again after I posted and noticed what I haven't done.

Im really determined to get the game working, no matter how many obstacles I hit.

bajanplay

  • Guest
My apologies for bumping what appears to be a month old thread. If the mods / admins feel this belongs somewhere else, I'm sorry, please move as appropriate.

I had similar problems using a gentoo x86_64 build.

Note: to simplify, this is the 'ufo' executable, which is called by the 'ufoai' script in the default installation dir ~/ufoai


someone@gresham ~/ufoai $ ./ufo   
./ufo: error while loading shared libraries: libcurl.so.4: cannot open shared object file: No such file or directory


So for starters:

someone@gresham ~/ufoai $ uname -a
Linux gresham 2.6.23-gentoo-r3 #4 SMP Fri Feb 8 01:55:24 EST 2008 x86_64 AMD Athlon(tm)64 X2 Dual Core Processor 3800+ AuthenticAMD GNU/Linux


I had already installed curl and used it before, so this seemed strange:


someone@gresham ~/ufoai $ ls -al /usr/lib/libcurl*
-rw-r--r-- 1 root vmware 451210 Feb 26 21:51 /usr/lib/libcurl.a
-rw-r--r-- 1 root vmware    925 Feb 26 21:51 /usr/lib/libcurl.la
lrwxrwxrwx 1 root vmware     16 Feb 26 21:51 /usr/lib/libcurl.so -> libcurl.so.4.0.1
lrwxrwxrwx 1 root vmware     16 Feb 26 21:51 /usr/lib/libcurl.so.4 -> libcurl.so.4.0.1
-rwxr-xr-x 1 root vmware 242248 Feb 26 21:51 /usr/lib/libcurl.so.4.0.1


Which seemed fine to me. So then, I checked the dynamic links:


someone@gresham ~/ufoai $ ldd ufo 
   linux-gate.so.1 =>  (0xffffe000)
   libdl.so.2 => /lib32/libdl.so.2 (0xf7ed1000)
   libm.so.6 => /lib32/libm.so.6 (0xf7eab000)
   libz.so.1 => /lib32/libz.so.1 (0xf7e98000)
   libcurl.so.4 => not found
   libjpeg.so.62 => /usr/lib32/libjpeg.so.62 (0xf7e77000)
   libpng12.so.0 => /usr/lib32/libpng12.so.0 (0xf7e53000)
   libSDL_ttf-2.0.so.0 => /usr/lib32/libSDL_ttf-2.0.so.0 (0xf7e4d000)
   libSDL_mixer-1.2.so.0 => /usr/lib32/libSDL_mixer-1.2.so.0 (0xf7e3c000)
   libSDL-1.2.so.0 => /usr/lib32/libSDL-1.2.so.0 (0xf7ddc000)
   libc.so.6 => /lib32/libc.so.6 (0xf7cac000)
   /lib/ld-linux.so.2 (0xf7f01000)
   libfreetype.so.6 => /usr/lib32/libfreetype.so.6 (0xf7c31000)
   libpthread.so.0 => /lib32/libpthread.so.0 (0xf7c1a000)
   libmikmod.so.2 => /usr/lib32/libmikmod.so.2 (0xf7be0000)
   libaudiofile.so.0 => /usr/lib32/libaudiofile.so.0 (0xf7bb8000)


And wondered why everything was linking against the lib32 versions.

I wasn't building this from source (no ebuild for gentoo yet...) so I checked the ufoai.x86_64:


someone@gresham ~/ufoai $ ldd ufo.x86_64
./ufo.x86_64: /usr/lib/libcurl.so.4: no version information available (required by ./ufo.x86_64)
<!-- snip -->
   libcurl.so.4 => /usr/lib/libcurl.so.4 (0x00002b927ceec000)
<!-- snip -->


Not sure why there was no version info available (my issue - nothing to do with this)

So then, I took a look at the ufoai script, and the relevant line is:


123 # start the game
124 ./${GAME_BINARY} ${CMD_ARGS} "$@"
125 EXITCODE="$?"


And $GAME_BINARY is set here:


 17 # The game binary
 18 GAME_BINARY="ufo"

 
I changed this to:
 

 17 # The game binary
 18 GAME_BINARY="ufo.x86_64"

 
And everything worked as it should.

Sorry if this was long winded: I'm wondering if I missed a step in the installation (perhaps a "check for 32bit libs" option or something like this)

If so, I'm sorry about the errant post. FYI, I also tried it out on another of my desktops - a kubuntu / kde 4.0 / intel 64bit box, and had similar problems, which were resolved in the same way (i.e. modifying the script)

Other than that, the game seems to work like a charm.

Probably the last thing that I should say is fantastic game. Not sure if I can emphasize that enough. This game is amazing. From the script to the graphics.

Ok, I've said my fill and then some. Hopefully this helps someone else, and it's not a repost (I couldn't find anything using the search)

cheers
.g.