How can I tell which libstdc++ double-conversion wants?

空扰寡人 提交于 2019-12-06 07:27:46

The ones in /usr/lib symlink to one file:

$ ls -l libstdc++*
lrwxrwxrwx 1 root root      19 2011-09-24 22:14 libstdc++.so.6 -> libstdc++.so.6.0.13
-rw-r--r-- 1 root root 1044112 2010-03-26 20:16 libstdc++.so.6.0.13

Just run:

sudo ln -si /usr/lib/libstdc++.so.6 /usr/lib/libstdc++.so

and it should work.

/usr/lib/libstdc++.so.6 should be a symlink to /usr/lib/libstdc++.so.6.0.14. This is probably the version you need.

/usr/lib32/libstdc++.so.6 should be a symlink to /usr/lib32/libstdc++.so.6.0.14, they are for 32-bit programs, you don't normally need them.

/usr/lib/gcc/x86_64-linux-gnu/4.4/libstdc++.so is the problem.

double-conversion-0.2.0.1 probably has got linked against it, and ghci cannot find it. Normally everything should be linked against libstdc++.so.6, not libstdc++.so without a version suffix.

I think one should not have a version-less libstdc++.so at all anywhere in the system. (There's none on my gentoo box for example.) It is dangerous, as different major versions of libstdc++ are usually binary incompatible. Try removing the library you have under /usr/lib/gcc/, then reinstall gcc and see if it gets installed again.

If it does get installed, then a symlink named /usr/lib/libstdc++.so pointing to /usr/lib/libstdc++.so.6 should solve this problem. I'm not sure this would be the right way to solve it in the long run though.

These are things I have found through experiments with my own Linux box. I am not an expert in Ubuntu, it may do things differently from other Linuxes.

To work around the issue on 64-bit Fedora 16:

sudo ln -si /usr/lib64/libstdc++.so.6 /usr/lib64/libstdc++.so
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!