在主目录中安装库 [英] install library in home directory
问题描述
在Linux(Ubuntu)中,我试图运行一个工具,它显示错误库丢失".我没有权限在系统中安装任何东西(或者根本无法从我的用户帐户安装sudo).
是否可以在我的主目录中安装缺少的库(在我的情况下为libstdc ++.so.6)(没有sudo)并更改环境变量等,以便所有其他工具/程序都可以找到它?
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?
推荐答案
是的,假设该库位于/home/user/lib
中.您可以设置使用 LD_LIBRARY_PATH
环境变量来查找库. LD_LIBRARY_PATH =/home/user/lib
,它将找到该库.如果必须自己进行编译,则需要使用 configure --prefix =/home/user
.
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
.
我很惊讶 libstdc ++.so.6
在系统上尚不可用.看一下/usr/lib/x86_64-linux-gnu
.如果可能是您的程序不了解多体系结构.
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.
这篇关于在主目录中安装库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!