[Rcpp-devel] RInside
Dirk Eddelbuettel
edd at debian.org
Mon Jul 12 22:52:21 CEST 2010
David,
Thanks for bringing the discussion here with is more topical for Rcpp and
RInside.
On 12 July 2010 at 16:34, David Rosengarten wrote:
| Hi,
|
| I originally emailed the r-sig-debian list and was directed here. I am
| trying to run the examples in /RInside/examples/standard such as
| rinside_sample_0, but I am getting the error:
|
| error while loading shared libraries: libR.so: cannot open shared object file:
| No such file or directory
|
| Does anyone know how to deal with this? I was told to include the output of
| 'make' and 'ldd ./rinside_sample0', so they are as follows:
|
| g++ -I/usr/share/R/include -I/usr/local/lib/R/site-library/Rcpp/include -I/usr/
| local/lib/R/site-library/RInside/lib -g -O2 -Wall -s rinside_sample0.cpp
| -L/usr/lib64/R/lib -lR -lblas -llapack -L/usr/local/lib/R/site-library/Rcpp/
| lib -lRcpp -Wl,-rpath,/usr/local/lib/R/site-library/Rcpp/lib -L/usr/local/lib/R
| /site-library/RInside/lib -lRInside -Wl,-rpath,/usr/local/lib/R/site-library/
| RInside/lib -o rinside_sample0
| g++ -I/usr/share/R/include -I/usr/local/lib/R/site-library/Rcpp/include -I/usr/
| local/lib/R/site-library/RInside/lib -g -O2 -Wall -s rinside_sample1.cpp
| -L/usr/lib64/R/lib -lR -lblas -llapack -L/usr/local/lib/R/site-library/Rcpp/
| lib -lRcpp -Wl,-rpath,/usr/local/lib/R/site-library/Rcpp/lib -L/usr/local/lib/R
| /site-library/RInside/lib -lRInside -Wl,-rpath,/usr/local/lib/R/site-library/
| RInside/lib -o rinside_sample1
| g++ -I/usr/share/R/include -I/usr/local/lib/R/site-library/Rcpp/include -I/usr/
| local/lib/R/site-library/RInside/lib -g -O2 -Wall -s rinside_sample2.cpp
| -L/usr/lib64/R/lib -lR -lblas -llapack -L/usr/local/lib/R/site-library/Rcpp/
| lib -lRcpp -Wl,-rpath,/usr/local/lib/R/site-library/Rcpp/lib -L/usr/local/lib/R
| /site-library/RInside/lib -lRInside -Wl,-rpath,/usr/local/lib/R/site-library/
| RInside/lib -o rinside_sample2
| g++ -I/usr/share/R/include -I/usr/local/lib/R/site-library/Rcpp/include -I/usr/
| local/lib/R/site-library/RInside/lib -g -O2 -Wall -s rinside_sample3.cpp
| -L/usr/lib64/R/lib -lR -lblas -llapack -L/usr/local/lib/R/site-library/Rcpp/
| lib -lRcpp -Wl,-rpath,/usr/local/lib/R/site-library/Rcpp/lib -L/usr/local/lib/R
| /site-library/RInside/lib -lRInside -Wl,-rpath,/usr/local/lib/R/site-library/
| RInside/lib -o rinside_sample3
| g++ -I/usr/share/R/include -I/usr/local/lib/R/site-library/Rcpp/include -I/usr/
| local/lib/R/site-library/RInside/lib -g -O2 -Wall -s rinside_sample4.cpp
| -L/usr/lib64/R/lib -lR -lblas -llapack -L/usr/local/lib/R/site-library/Rcpp/
| lib -lRcpp -Wl,-rpath,/usr/local/lib/R/site-library/Rcpp/lib -L/usr/local/lib/R
| /site-library/RInside/lib -lRInside -Wl,-rpath,/usr/local/lib/R/site-library/
| RInside/lib -o rinside_sample4
| g++ -I/usr/share/R/include -I/usr/local/lib/R/site-library/Rcpp/include -I/usr/
| local/lib/R/site-library/RInside/lib -g -O2 -Wall -s rinside_sample5.cpp
| -L/usr/lib64/R/lib -lR -lblas -llapack -L/usr/local/lib/R/site-library/Rcpp/
| lib -lRcpp -Wl,-rpath,/usr/local/lib/R/site-library/Rcpp/lib -L/usr/local/lib/R
| /site-library/RInside/lib -lRInside -Wl,-rpath,/usr/local/lib/R/site-library/
| RInside/lib -o rinside_sample5
| g++ -I/usr/share/R/include -I/usr/local/lib/R/site-library/Rcpp/include -I/usr/
| local/lib/R/site-library/RInside/lib -g -O2 -Wall -s rinside_sample6.cpp
| -L/usr/lib64/R/lib -lR -lblas -llapack -L/usr/local/lib/R/site-library/Rcpp/
| lib -lRcpp -Wl,-rpath,/usr/local/lib/R/site-library/Rcpp/lib -L/usr/local/lib/R
| /site-library/RInside/lib -lRInside -Wl,-rpath,/usr/local/lib/R/site-library/
| RInside/lib -o rinside_sample6
| g++ -I/usr/share/R/include -I/usr/local/lib/R/site-library/Rcpp/include -I/usr/
| local/lib/R/site-library/RInside/lib -g -O2 -Wall -s rinside_sample7.cpp
| -L/usr/lib64/R/lib -lR -lblas -llapack -L/usr/local/lib/R/site-library/Rcpp/
| lib -lRcpp -Wl,-rpath,/usr/local/lib/R/site-library/Rcpp/lib -L/usr/local/lib/R
| /site-library/RInside/lib -lRInside -Wl,-rpath,/usr/local/lib/R/site-library/
| RInside/lib -o rinside_sample7
| g++ -I/usr/share/R/include -I/usr/local/lib/R/site-library/Rcpp/include -I/usr/
| local/lib/R/site-library/RInside/lib -g -O2 -Wall -s rinside_sample8.cpp
| -L/usr/lib64/R/lib -lR -lblas -llapack -L/usr/local/lib/R/site-library/Rcpp/
| lib -lRcpp -Wl,-rpath,/usr/local/lib/R/site-library/Rcpp/lib -L/usr/local/lib/R
| /site-library/RInside/lib -lRInside -Wl,-rpath,/usr/local/lib/R/site-library/
| RInside/lib -o rinside_sample8
| g++ -I/usr/share/R/include -I/usr/local/lib/R/site-library/Rcpp/include -I/usr/
| local/lib/R/site-library/RInside/lib -g -O2 -Wall -s rinside_test0.cpp -L
| /usr/lib64/R/lib -lR -lblas -llapack -L/usr/local/lib/R/site-library/Rcpp/lib
| -lRcpp -Wl,-rpath,/usr/local/lib/R/site-library/Rcpp/lib -L/usr/local/lib/R/
| site-library/RInside/lib -lRInside -Wl,-rpath,/usr/local/lib/R/site-library/
| RInside/lib -o rinside_test0
| g++ -I/usr/share/R/include -I/usr/local/lib/R/site-library/Rcpp/include -I/usr/
| local/lib/R/site-library/RInside/lib -g -O2 -Wall -s rinside_test1.cpp -L
| /usr/lib64/R/lib -lR -lblas -llapack -L/usr/local/lib/R/site-library/Rcpp/lib
| -lRcpp -Wl,-rpath,/usr/local/lib/R/site-library/Rcpp/lib -L/usr/local/lib/R/
| site-library/RInside/lib -lRInside -Wl,-rpath,/usr/local/lib/R/site-library/
| RInside/lib -o rinside_test1
|
| linux-vdso.so.1 => (0x00007fff30bff000)
| libR.so => not found
| libblas.so.3gf => /usr/lib/atlas/libblas.so.3gf (0x00007f50d2512000)
| liblapack.so.3gf => /usr/lib/atlas/liblapack.so.3gf (0x00007f50d190a000)
| libRcpp.so => /usr/local/lib/R/site-library/Rcpp/lib/libRcpp.so
| (0x00007f50d16b2000)
| libRInside.so => /usr/local/lib/R/site-library/RInside/lib/libRInside.so
| (0x00007f50d149d000)
| libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x00007f50d1188000)
| libm.so.6 => /lib/libm.so.6 (0x00007f50d0f05000)
| libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x00007f50d0cee000)
| libc.so.6 => /lib/libc.so.6 (0x00007f50d096a000)
| libgfortran.so.3 => /usr/lib/libgfortran.so.3 (0x00007f50d067d000)
| /lib64/ld-linux-x86-64.so.2 (0x00007f50d2ecd000)
| libR.so => not found
| libR.so => not found
There is your problem.
| I have R and r-base-dev installed, so I don't understand why this is happening.
| Any help would be much appreciated.
You may have R, but I suspect you do not have R built with shared libraries.
The quickest fix, given that you started on r-sig-debian, may be
$ sudo apt-get install r-base-core
Else you can of course rebuild R from source etc, but you have to tell
configure to use --enable-R-shlib or else you cannot embed R. And
RInside wants to embed R, so you can't the latter witout the former.
Hope this helps.
--
Regards, Dirk
More information about the Rcpp-devel
mailing list