linux armv7_32环境变量配置(LD_LIBRARY_PATH 库搜索路径)

Posted Dontla

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了linux armv7_32环境变量配置(LD_LIBRARY_PATH 库搜索路径)相关的知识,希望对你有一定的参考价值。

20220106 我交叉编译了一个ffmpeg,运行二进制文件需要搜索库,于是在/etc/profile里添加了库搜索路径(在最后面添加)

export PATH=/bin:/sbin:/usr/bin:/usr/sbin

if [ "$PS1" ]; then
	if [ "`id -u`" -eq 0 ]; then
		export PS1='[\\u@\\h:\\w]# '
	else
		export PS1='[\\u@\\h:\\w]$ '
	fi
fi

export PAGER='/bin/more '
export EDITOR='/bin/vi'

# Source configuration files from /etc/profile.d
for i in /etc/profile.d/*.sh ; do
	if [ -r "$i" ]; then
		. $i
	fi
	unset i
done

# arnold add 20220106
#LD_LIBRARY_PATH="/opt/ffmpeg/lib"
LD_LIBRARY_PATH="/opt/ffmpeg/lib:/oem/usr/lib:/mnt/lib:/lib:/usr/local/lib:/usr/lib:/opt/sbin:/opt/lib:/opt/lib/sns"

参考文章:linux下将指定目录加入环境变量的方法

laoyuan给的arm摄像头的/etc/profile文件

export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/opt/python3/bin:/opt/curl

if [ "$PS1" ]; then
	if [ "`id -u`" -eq 0 ]; then
		export PS1='[\\u@\\h:\\w]# '
	else
		export PS1='[\\u@\\h:\\w]$ '
	fi
fi

export PAGER='/bin/more '
export EDITOR='/bin/vi'

# Source configuration files from /etc/profile.d
for i in /etc/profile.d/*.sh ; do
	if [ -r "$i" ]; then
		. $i
	fi
	unset i
done
echo 1 >/proc/sys/kernel/randomize_va_space
echo 36523 >/proc/sys/vm/min_free_kbytes
PATH="/usr/bin:/usr/sbin:/bin:/sbin:/opt/sbin:/opt/python3/bin:/opt/curl"
LD_LIBRARY_PATH="/oem/usr/lib:/mnt/lib:/lib:/usr/local/lib:/usr/lib:/opt/sbin:/opt/lib:/opt/lib/sns"

以上是关于linux armv7_32环境变量配置(LD_LIBRARY_PATH 库搜索路径)的主要内容,如果未能解决你的问题,请参考以下文章

树莓派3b+_32位linux系统arm架构安装JDK

板子armv7_32怎么挂载windows文件夹?

iOS armv7, armv7s, arm64区别与应用32位、64位配置

Shell-配置libpath环境变量

无法解析配置“:_armv7DebugCompile”的所有依赖项

java环境变量老是设置不对