如何修改LD_LIBRARY_PATH环境变量? [英] How to modify a LD_LIBRARY_PATH environment variable?

查看:143
本文介绍了如何修改LD_LIBRARY_PATH环境变量?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有Ubuntu 16.04,并安装了gtk + 3.22.20,需要GLIB> = 2.49.4的版本.运行"configure"脚本时,它说它检测到GLIB为2.48.2.但是,自从我安装该版本以来,"pkg-config --modversion glib-2.0"返回2.52.3.

I have Ubuntu 16.04, and installing gtk+3.22.20, a version of GLIB >= 2.49.4 is needed. When running the 'configure' script, it says it detects that GLIB is 2.48.2. However, 'pkg-config --modversion glib-2.0' returns 2.52.3 since I installed that version.

他们建议:

"删除旧版本的GLib.您还可以通过修改LD_LIBRARY_PATH环境变量或编辑/etc/ld.so.conf来解决该错误.如果需要,请确保已运行ldconfig.您的系统."

"remove the old version of GLib. You may also be able to fix the error by modifying your LD_LIBRARY_PATH enviroment variable, or by editing /etc/ld.so.conf. Make sure you have run ldconfig if that is required on your system."

如何解决这个问题?

推荐答案

您可以将其添加到〜/.bashrc:

You can add it to your ~/.bashrc:

echo"export LD_LIBRARY_PATH = $ LD_LIBRARY_PATH:/your/custom/path/">>〜/.bashrc

这篇关于如何修改LD_LIBRARY_PATH环境变量?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆