執行程序時找不到庫文件的解決辦法
提示 :
cannot open shared object file: No such file or directory
解決方法如下:
/usr/bin/ld: cannot find -llibname
把.so連接庫所在的目錄添加到 /etc/ld.so.conf文件中
include ld.so.conf.d/*.conf
include /home/zhengxh/chinautrust/cadev/*.so
運行命令
#ldconfig
就可以了
命令窗口出現亂碼解決
定義語言為英文 ,使用命令export LANG=en_US.TUF-8
執行程序時,提示依賴的庫文件權限不夠的解決
現象如:
./dlserver: error while loading shared libraries: ./libwstlib.so: cannot restore segment prot after reloc: Permission denied
錯誤原因在于selinux禁用了訪問此共享庫
解決辦法: 關閉selinux
1、編輯/etc/selinux/config文件,找到SELINUX=enforcing,改為SELINUX=disabled
2、編輯/etc/sysconfig/selinux文件,找到SELINUX=enforcing,改為SELINUX=disabled
3、重啟電腦
shell關閉,程序或是服務退出的解決:
解決方法為在命令前加上nohup,再在后面加& 如 >nohup startup.sh &
提示 :
cannot open shared object file: No such file or directory
解決方法如下:
/usr/bin/ld: cannot find -llibname
把.so連接庫所在的目錄添加到 /etc/ld.so.conf文件中
include ld.so.conf.d/*.conf
include /home/zhengxh/chinautrust/cadev/*.so
運行命令
#ldconfig
就可以了
命令窗口出現亂碼解決
定義語言為英文 ,使用命令export LANG=en_US.TUF-8
執行程序時,提示依賴的庫文件權限不夠的解決
現象如:
./dlserver: error while loading shared libraries: ./libwstlib.so: cannot restore segment prot after reloc: Permission denied
錯誤原因在于selinux禁用了訪問此共享庫
解決辦法: 關閉selinux
1、編輯/etc/selinux/config文件,找到SELINUX=enforcing,改為SELINUX=disabled
2、編輯/etc/sysconfig/selinux文件,找到SELINUX=enforcing,改為SELINUX=disabled
3、重啟電腦
shell關閉,程序或是服務退出的解決:
解決方法為在命令前加上nohup,再在后面加& 如 >nohup startup.sh &