我试图在Ubuntu Linux(16.04)系统上以当前最新版本的R(3.3.2)安装Rmpi。我已经googled并尝试了我能想到的所有内容但是在尝试在显然已经成功安装后测试加载包时无法通过此错误。欢迎任何建议。
*** installing help indices
** building package indices
** testing if installed package can be loaded
Error in system2(file.path(R.home("bin"), "R"), c(if (nzchar(arch)) paste0("--arch=", :
error in running command
答案 0 :(得分:0)
sudo apt-get install r-cran-rmpi
有什么问题?像这里的魅力一样。
同样install.r Rmpi
(其中install.r
只是我的小包装的帮手):
$ install.r Rmpi
trying URL 'https://cran.rstudio.com/src/contrib/Rmpi_0.6-6.tar.gz'
Content type 'application/x-gzip' length 105181 bytes (102 KB)
==================================================
downloaded 102 KB
* installing *source* package ‘Rmpi’ ...
** package ‘Rmpi’ successfully unpacked and MD5 sums checked
checking for gcc... ccache gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether ccache gcc accepts -g... yes
checking for ccache gcc option to accept ISO C89... none needed
I am here /usr/lib/openmpi and it is OpenMPI
Trying to find mpi.h ...
Found in /usr/lib/openmpi/include
Trying to find libmpi.so or libmpich.a ...
Found libmpi in /usr/lib/openmpi/lib
checking for orted... yes
checking for openpty in -lutil... yes
checking for main in -lpthread... yes
configure: creating ./config.status
config.status: creating src/Makevars
** libs
ccache gcc -I/usr/share/R/include -DNDEBUG -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -I/usr/lib/openmpi/include -DMPI2 -DOPENMPI -fpic -O3 -g0 -Wall -pipe -pedantic -std=gnu99 -I/usr/local/cuda/include -I/usr/share/R/include -c Rmpi.c -o Rmpi.o
ccache gcc -I/usr/share/R/include -DNDEBUG -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -I/usr/lib/openmpi/include -DMPI2 -DOPENMPI -fpic -O3 -g0 -Wall -pipe -pedantic -std=gnu99 -I/usr/local/cuda/include -I/usr/share/R/include -c conversion.c -o conversion.o
ccache gcc -I/usr/share/R/include -DNDEBUG -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -I/usr/lib/openmpi/include -DMPI2 -DOPENMPI -fpic -O3 -g0 -Wall -pipe -pedantic -std=gnu99 -I/usr/local/cuda/include -I/usr/share/R/include -c internal.c -o internal.o
ccache gcc -shared -L/usr/lib/R/lib -Wl,-Bsymbolic-functions -Wl,-z,relro -o Rmpi.so Rmpi.o conversion.o internal.o -L/usr/lib/openmpi/lib -lmpi -lutil -lpthread -L/usr/lib/R/lib -lR
installing to /usr/local/lib/R/site-library/Rmpi/libs
** R
** demo
** inst
** preparing package for lazy loading
** help
*** installing help indices
** building package indices
** testing if installed package can be loaded
* DONE (Rmpi)
The downloaded source packages are in
‘/tmp/downloaded_packages’
$