Error while building for linux: libfmod.so.6

What distro are you using? These steps worked for me on ubuntu and a fresh install of elementary os (which is based on ubuntu)

I’m using Linux Deepin, I think it’s based on Debian

Well, I finallly got it to work. I did a sudo apt-get update and it did take a bit long to finish, then I reboot. When I tested it again, the windows with cocos finally opened. Thank you for your help!

It finally work ! In deepin(linux),after coping those files,you have to run ./install-deps-linux again !

2 Likes

Hi, I also had this issue on Linux Mint. Your (Andyscream) last step fixed this annoying issue :wink:
Thank you!

My total solution:

  1. copy
    sudo cp <COCOS FOLDER LOCATION>/external/linux-specific/fmod/prebuilt/64-bit/libfmod.so /usr/local/lib/
    sudo cp <COCOS FOLDER LOCATION>/external/linux-specific/fmod/prebuilt/64-bit/libfmodL.so /usr/local/lib/

  2. create symbolic link in /usr/local/lib/
    ln -s libfmod.so libfmod.so.6

  3. run ./install-deps-linux again

7 Likes

Sorry for dragging up an old thread. Just wanted to say thanks for this Linux Mint solution :slight_smile:

Helped me on Ubuntu 15.10

See also my comment here for an alternative.

For Ubuntu16.04 LTS, and Cocos2d-x-3.13.1
sudo cp libfmod.so and libfmodL.so to /usr/lib , not /usr/local/lib,
and then ln -s libfmod.so libfmod.so.6

4 Likes

This worked perfectly. Thank you !

This worked perfectly. Thank you !

@dimon4deg thanks a lot!
Your solution worked exactly for me!
I had the same problem. Eventually with your solution, I ran my game on Xubuntu 16.04 using Cocos2d-x v3.16 .

Hello, i have similar error:
/cocos2d-x/TestGameDir/TestGame/bin/debug/linux/TemplateCpp: error while loading shared libraries: /cocos2d-x/TestGameDir/TestGame/cocos2d/external/linux-specific/fmod/prebuilt/64-bit/libfmod.so.6: file too short

I’ve tried solution from this thread, but it didn’t help me at all.
By now i’m pissed, any help?

Tell us more. What Linux version? What Cocos2d-x version? How did you get Cocos2d-x? .zip or clone our GitHub repo?

Did you follow the instructions in our docs?

Ops, sorry about this.
My OS is Debian 9 and i’ve cloned Cocos2d-x from git, then followed instruction from readme.md (installed all dependancies and etc).
I’ve already tried solutions: cp and add symlinks (both /usr/lib and /usr/local/lib), manually installed fmod, but it didn’t help me at all.
Also, i have made an issue about this on github: https://github.com/cocos2d/cocos2d-x/issues/18882.

I see. Thanks. I will have a look at the issue.

If the comments from @drelaptop don’t help, please tell me exactly the steps you took to install cocos2d-x and get it working. Thanks.

i have similar error.
/cocos2d-x/TestGameDir/TestGame/bin/debug/linux/TemplateCpp: error while loading shared libraries: /cocos2d-x/TestGameDir/TestGame/cocos2d/external/linux-specific/fmod/prebuilt/64-bit/libfmod.so.6: file too short

I installed Сocos2dx on Fedora 28, made a clone of the repository with GitHub. Did everything according to the instructions from GitHub

Did you follow our Linux install doc though?

Yes. I did everything as instructed

Off topic…
Are there any plans for removing fmod?
Please check licence. I think that fmod should not be used in cocos…
https://www.fmod.com/licensing