V8安装:
需要一个静态库。解决方法如下:
在R命令行中输入
Sys.setenv(DOWNLOAD_STATIC_LIBV8 = 1)
install.packages("V8")
fs安装
最近使用R包“DiffBind”分析数据,在安装依赖包“fs”时一直报错,命令行如下:
conda activate chipseq1
R
library(BiocManager)
BiocManager::install("fs")
错误及解决方法如下:
src/.libs/libuv_la-fs-poll.o: file not recognized: File format not recognized
collect2: error: ld returned 1 exit status
make[1]: *** [Makefile:1745: libuv.la] Error 1
make[1]: Leaving directory '/tmp/RtmpvaTCs1/R.INSTALL47746c681b53/fs/src/libuv-1.38.1'
make: *** [Makevars:35: libuv-1.38.1/.libs/libuv.a] Error 2
ERROR: compilation failed for package ‘fs’
* removing ‘/lustre/home/acct-medzxz/medzxz/miniconda3/envs/chipseq1/lib/R/library/fs’
ERROR: dependency ‘fs’ is not available for package ‘batchtools’
* removing ‘/lustre/home/acct-medzxz/medzxz/miniconda3/envs/chipseq1/lib/R/library/batchtools’
The downloaded source packages are in
‘/tmp/Rtmp4wNQWj/downloaded_packages’
Updating HTML index of packages in '.Library'
Making 'packages.html' ... done
Warning messages:
1: In .inet_warning(msg) :
installation of package ‘fs’ had non-zero exit status
2: In .inet_warning(msg) :
installation of package ‘batchtools’ had non-zero exit status
主要是编译错误,缺少libuv库,或者libuv库编译错误,我下载了libuv,然后按照流程编译
git clone [https://github.com/libuv/libuv.git](https://github.com/libuv/libuv.git)
cd libuv/
./autogen.sh
./configure --prefix=/your/path/ ##这里不指定路径后边编译会出错,至少我是这样
make
make install
####编译完成后,将lib路径加入环境变量
#方法一:
export LD_LIBRARY_PATH=LD_LIBRARY_PATH:/XXX #但是退出当前终端后就失效
#方法二:
修改~/.bashrc或~/.bash_profile或系统级别的/etc/profile
网友评论