红联Linux门户
Linux帮助

借助apt-file命令 可以查找缺少包所依赖的linux文件

发布时间:2016-04-18 15:40:51来源:linux网站作者:默默拧着酱油瓶路过

在Linux下安装完 R 和 RStudio之后, 启动RStudio的时候, 报错: rstudio: error while loading shared libraries: libgstreamer-0.10.so.0: cannot open shared object file: No such file or directory


查找资料之后, 借助 apt-file 命令 可以查找缺少包所依赖的linux文件, 然后用 apt-get install 安装所对应的文件。


apt-file默认是没有安装的, 需要先安装apt-file
sudoapt−getinstallapt−file sudo apt-file update


启动RStudio报错:
$ rstudio
rstudio: error while loading shared libraries: libgstreamer-0.10.so.0: cannot open shared object file: No such file or directory


用 apt-file 查找 libgstreamer-0.10.so.0 对应的文件,
$ apt-file search libgstreamer-0.10.so.0
libgstreamer0.10-0: /usr/lib/x86_64-linux-gnu/libgstreamer-0.10.so.0
libgstreamer0.10-0: /usr/lib/x86_64-linux-gnu/libgstreamer-0.10.so.0.30.0


通过上面查到 包 对应的文件是 libgstreamer0.10-0, 用 apt-get install 安装:
$ sudo apt-get install libgstreamer0.10-0


报缺失 libgstapp-0.10.so.0 错误的解决方法类似:
rstudiorstudio:errorwhileloadingsharedlibraries:libgstapp−0.10.so.0:cannotopensharedobjectfile:Nosuchfileordirectory apt-file search libgstapp-0.10.so.0
libgstreamer-plugins-base0.10-0: /usr/lib/x86_64-linux-gnu/libgstapp-0.10.so.0
libgstreamer-plugins-base0.10-0: /usr/lib/x86_64-linux-gnu/libgstapp-0.10.so.0.25.0
$ sudo apt-get install libgstreamer-plugins-base0.10-0


本文永久更新地址:http://www.linuxdiyf.com/linux/19884.html