Cocos2d-x异常:

​./cpp-tests: error while loading shared libraries: /home/kyun/Desktop/coco2dx/cocos2d-x-4.0/external/linux-specific/fmod/prebuilt/64-bit/libfmod.so.6: file too short​​ 解决办法:

~$ cd /home/kyun/Desktop/coco2dx/cocos2d-x-4.0/external/linux-specific/fmod/prebuilt/64-bit/
~/Desktop/coco2dx/cocos2d-x-4.0/external/linux-specific/fmod/prebuilt/64-bit$ tree -l
.
libfmodL.so
libfmodL.so.6
libfmod.so
libfmod.so.6 -> libfmod.so
~/Desktop/coco2dx/cocos2d-x-4.0/external/linux-specific/fmod/prebuilt/64-bit$ cat libfmod.so.6
libfmod.so

从上面的信息我们可知libfmodL.so.6是一个连接到libfmodL.so的软连接,但是从cat libfmodL.so.6的结果可知这个软连接是有问题的。因此,我们重建软连接就可以解决问题:

~/Desktop/coco2dx/cocos2d-x-4.0/external/linux-spe/prebuilt/64-bit$ rm libfmod.so.6
~/Desktop/coco2dx/cocos2d-x-4.0/external/linux-specific/fmod/prebuilt/64-bit$ ln -s libfmod.so libfmod.so.6

这样问题就解决了。

谢谢阅读!