启动R,但无法findliblzma.so.2

我安装了R,但是当我尝试启动时,我得到:

ubuntu@ip-xx-250-202:/mnt/galaxyData/custom/MY_MSG_RUN$ R /mnt/galaxyData/custom/bin/lib64/R/bin/exec/R: error while loading shared libraries: liblzma.so.2: cannot open shared object file: No such file or directory 

这是ldd命令,看看它在想什么?

 ubuntu@ip-xx-250-202:/mnt/galaxyData/custom/MY_MSG_RUN$ ldd /mnt/galaxyData/custom/bin/lib64/R/bin/exec/R linux-vdso.so.1 => (0x00007fff201ff000) libRblas.so => /mnt/galaxyData/custom/bin/lib64/R/lib/libRblas.so (0x00007f9a04184000) libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f9a03e67000) libreadline.so.6 => /lib/x86_64-linux-gnu/libreadline.so.6 (0x00007f9a03c24000) liblzma.so.2 => not found libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f9a03a20000) libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f9a03662000) /lib64/ld-linux-x86-64.so.2 (0x00007f9a043b0000) libtinfo.so.5 => /lib/x86_64-linux-gnu/libtinfo.so.5 (0x00007f9a0343b000) 

你们知道为什么没有findliblzma.so.2,我可以把这个文件放在哪里,让Rfind它?

我看到liblzma-dev软件包似乎已经安装,但不是lzma或liblzma2。 在这个问题的另一个扳手是我在共享主机,所以我不能做一个apt-get来安装这些软件包。 (至less我没有根)

 ubuntu@ip-xx-250-202:/mnt/galaxyData/custom/MY_MSG_RUN$ dpkg -s liblzma-dev Package: liblzma-dev Status: install ok installed Priority: optional Section: libdevel Installed-Size: 476 Maintainer: Ubuntu Developers <[email protected]> Architecture: amd64 Source: xz-utils Version: 5.1.1alpha+20110809-3 Depends: liblzma5 (= 5.1.1alpha+20110809-3) Suggests: liblzma-doc Description: XZ-format compression library - development files XZ is the successor to the Lempel-Ziv/Markov-chain Algorithm compression format, which provides memory-hungry but powerful compression (often better than bzip2) and fast, easy decompression. . The native format of liblzma is XZ; it also supports raw (headerless) streams and the older LZMA format used by lzma. (For 7-Zip's related format, use the p7zip package instead.) This package provides the development library needed to build programs using liblzma. Original-Maintainer: Jonathan Nieder <[email protected]> Homepage: http://tukaani.org/xz/ 

看来你的机器似乎运行的Ubuntu,我build议安装R作为Ubuntu的包 。 这样,软件包pipe理器将确保已安装的库和二进制文件相互匹配。

编辑:我现在看到你没有root权限。 但是也许你可以使用fakeroot来运行debootstrap来获得你自己的包pipe理器,并且看看安装的是什么。 或者您必须自己解压*.deb文件,并尝试修复硬编码path引入的任何问题。 设置LD_LIBRARY_PATH可能是朝这个方向迈出的重要一步。 请注意,Ubuntu的软件包将使用liblzma.so.5 ,所以至less看起来是一个依赖,你不需要单独安装。

如果你不能使用包pipe理器安装的预编译的二进制文件,请从源代码编译R,以便根据系统上可用的库进行编译。

如果你不能这样做,从你获得你的R二进制文件的地方获取相同来源的库。

我最终这样做,我不知道是否会导致问题,但至lessR开始。

我做了一个到/usr/lib/x86_64-linux-gnu/liblzma.so.5的调用liblzma.so.2的符号链接。

 ubuntu@ip-xx-250-202:/mnt/galaxyData/custom/MY_MSG_RUN$ cp /usr/lib/x86_64-linux-gnu/liblzma.so.5 /mnt/galaxyData/custom/bin/lib64/R/lib ubuntu@ip-xx-250-202:/mnt/galaxyData/custom/MY_MSG_RUN$ cd /mnt/galaxyData/custom/bin/lib64/R/lib ubuntu@ip-xx-250-202:/mnt/galaxyData/custom/bin/lib64/R/lib$ ls liblzma.so.5 libRblas.so libRlapack.so ubuntu@ip-xx-250-202:/mnt/galaxyData/custom/bin/lib64/R/lib$ ln -s liblzma.so.5 liblzma.so.2