gpt4 book ai didi

r - 在ubuntu上编译R包,无效的ELF header

转载 作者:行者123 更新时间:2023-12-02 10:42:13 25 4
gpt4 key购买 nike

我不再能够从源代码编译R包,而这在今天以前从来不是问题。这是发生了什么:

R CMD build BAMMtools
* checking for file ‘BAMMtools/DESCRIPTION’ ... OK
* preparing ‘BAMMtools’:
* checking DESCRIPTION meta-information ... OK
* cleaning src
* checking for LF line-endings in source and make files
* checking for empty or unneeded directories
* looking to see if a ‘data/datalist’ file should be added
* building ‘BAMMtools_2.1.0.tar.gz’


R CMD INSTALL BAMMtools
* installing to library ‘/usr/local/lib/R/site-library’
* installing *source* package ‘BAMMtools’ ...
** libs
make: Nothing to be done for 'all'.
installing to /usr/local/lib/R/site-library/BAMMtools/libs
** R
** data
** inst
** preparing package for lazy loading
** help
*** installing help indices
** building package indices
** testing if installed package can be loaded
Error in dyn.load(file, DLLpath = DLLpath, ...) :
unable to load shared object '/usr/local/lib/R/site-library/BAMMtools/libs/BAMMtools.so':
/usr/local/lib/R/site-library/BAMMtools/libs/BAMMtools.so: invalid ELF header
Error: loading failed
Execution halted
ERROR: loading failed
* removing ‘/usr/local/lib/R/site-library/BAMMtools’
* restoring previous ‘/usr/local/lib/R/site-library/BAMMtools’

尤其对于此R软件包,这似乎不是问题,因为我可以从R内部安装该软件包,如下所示:
> install.packages('BAMMtools_2.1.0.tar.gz', repos=NULL)
Installing package into ‘/usr/local/lib/R/site-library’
(as ‘lib’ is unspecified)
* installing *source* package ‘BAMMtools’ ...
** libs
gcc -std=gnu99 -I/usr/share/R/include -DNDEBUG -fpic -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g -c cohort_matrix.c -o cohort_matrix.o
gcc -std=gnu99 -I/usr/share/R/include -DNDEBUG -fpic -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g -c dtrates.c -o dtrates.o
gcc -std=gnu99 -I/usr/share/R/include -DNDEBUG -fpic -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g -c jenksBrks.c -o jenksBrks.o
gcc -std=gnu99 -I/usr/share/R/include -DNDEBUG -fpic -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g -c treetraverse.c -o treetraverse.o
gcc -std=gnu99 -shared -L/usr/lib/R/lib -Wl,-Bsymbolic-functions -Wl,-z,relro -o BAMMtools.so cohort_matrix.o dtrates.o jenksBrks.o treetraverse.o -L/usr/lib/R/lib -lR
installing to /usr/local/lib/R/site-library/BAMMtools/libs
** R
** data
** inst
** preparing package for lazy loading
** help
*** installing help indices
** building package indices
** testing if installed package can be loaded
* DONE (BAMMtools)

我正在wily下运行R v3.2.2,在Ubuntu v15.10下。除了使用sudo apt-get update/upgrade更新系统之外,我想不到最近24小时内完成的任何操作。

尽管这对于安装软件包来说不是太大的问题,但是我也不能运行R CMD检查命令,这是开发的问题。

任何建议或意见,将不胜感激!谢谢!

最佳答案

正如对该问题的评论中所发现的,多亏了Jack Wasey,问题仅仅是我在源目录的名称上而不是在生成的R CMD INSTALL文件上运行.tar.gz

关于r - 在ubuntu上编译R包,无效的ELF header ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33533492/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com