install library in home directory

对着背影说爱祢 提交于 2021-02-06 09:31:32

问题



In Linux(Ubuntu) I am trying to run a tool and it is showing error "library missing". I don't have permission to install anything in the system (or simply sudo is not possible from my user account).
Is it possible to install missing library (libstdc++.so.6 in my case) in my home directory (without sudo) and change the environment-variables etc. so that all other tools/programs can find it?


回答1:


Yes, assuming the library is in /home/user/lib. You can set use the LD_LIBRARY_PATH environment variable to find the lib. LD_LIBRARY_PATH=/home/user/lib, which will find the library. If you have to compile it yourself you will want to use configure --prefix=/home/user.

I'm surprised that libstdc++.so.6 isn't available on the system already. Take a look in /usr/lib/x86_64-linux-gnu. If could just be your program isn't multiarch aware.



来源:https://stackoverflow.com/questions/8944271/install-library-in-home-directory

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