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 !
Hi, I also had this issue on Linux Mint. Your (Andyscream) last step fixed this annoying issue
Thank you!
My total solution:
-
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/ -
create symbolic link in /usr/local/lib/
ln -s libfmod.so libfmod.so.6 -
run ./install-deps-linux again
Sorry for dragging up an old thread. Just wanted to say thanks for this Linux Mint solution
Helped me on Ubuntu 15.10
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
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
Show me all the commands you ran, please
Hello,
I’ve had the same problem, with Archlinux
- unzip the file cocos2d-x-3.17.zip in my source directories
- creating linux-build sub-directory in ~/sources/cocos2d-x-3.17/build.
- creating makefiles with
cmake ../.. -DCMAKE_BUILD_TYPE=Release
(i had built also Debug version with no changes later)
make -j 5
Then, when i want to launch sample (lua, C++ or Javascript), i get the same error:
~/sources/cocos2d-x-3.17/build/linux-build/bin/Release/cpp-tests$ ./cpp-tests
./cpp-tests: error while loading shared libraries: /home/linox/sources/cocos2d-x-3.17/external/linux-specific/fmod/prebuilt/64-bit/libfmod.so.6: file too short
Going to the prebuilt files for fmod, i see that the versioned lib files are not symlinks as it should be, but text files containing the name of the lib.
~/sources/cocos2d-x-3.17/external/linux-specific/fmod/prebuilt/64-bit$ file *
libfmodL.so: ELF 64-bit LSB pie executable x86-64, version 1 (SYSV), dynamically linked, BuildID[sha1]=bf0431418a9ee1ef4a3b6f5ce043aa1d998b71bb, stripped
libfmodL.so.6: ASCII text, with no line terminators
libfmod.so: ELF 64-bit LSB pie executable x86-64, version 1 (SYSV), dynamically linked, BuildID[sha1]=f50320fe8853360a3d1526fdfea8e4c63fdd15f9, stripped
libfmod.so.6: ASCII text, with no line terminators
~/sources/cocos2d-x-3.17/external/linux-specific/fmod/prebuilt/64-bit$ for i in *6; do echo "file \"$i\" contains: $(cat $i)"; done
file "libfmodL.so.6" contains: libfmodL.so
file "libfmod.so.6" contains: libfmod.so
The solution is to to remove the numbered files, and to symlink them to the matching library:
~/sources/cocos2d-x-3.17/external/linux-specific/fmod/prebuilt/64-bit$ rm *so.6
~/sources/cocos2d-x-3.17/external/linux-specific/fmod/prebuilt/64-bit$ ln -s libfmodL.so libfmodL.so.6
~/sources/cocos2d-x-3.17/external/linux-specific/fmod/prebuilt/64-bit$ ln -s libfmod.so libfmod.so.6
And it works, as you can see, the rpath linking is working:
~/sources/cocos2d-x-3.17/build/linux-build/bin/Release/cpp-tests$ ldd cpp-tests | grep -i fmod
libfmod.so.6 => /home/linox/sources/cocos2d-x-3.17/external/linux-specific/fmod/prebuilt/64-bit/libfmod.so.6 (0x00007ff8b793c000)
I believe that linux users without problems on this one are those with fmod libs already installed. As they are found in the LD path (usually /usr/lib), rpath hardcoded lib is not used. Well, i think
Thank you for reading