<meta http-equiv="content-type" content="text/html; charset=utf-8"><span class="Apple-style-span" style="font-family: arial, sans-serif; font-size: 13px; border-collapse: collapse; ">The result of sudo apt-get install r-base-core is:<div>
<br></div><div><div>Reading package lists... Done</div><div>Building dependency tree </div><div>Reading state information... Done</div><div>r-base-core is already the newest version.</div><div>r-base-core set to manually installed.</div>
<div>The following packages were automatically installed and are no longer required:</div><div> linux-headers-2.6.32-21-generic linux-headers-2.6.32-21 dkms</div><div>Use 'apt-get autoremove' to remove them.</div>
<div>0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.</div><div><br></div><div>So, it looks like I should already have the shared libraries installed. I originally installed the R packages from the Ubuntu Software Center, and then I installed Rcpp and RInside using install.packages() in R. Does this give any new information, or should I try uninstalling everything and starting from scratch?</div>
<div><br></div><div>Thanks,</div><div>David</div></div></span><br><div class="gmail_quote">On Mon, Jul 12, 2010 at 4:52 PM, Dirk Eddelbuettel <span dir="ltr"><<a href="mailto:edd@debian.org">edd@debian.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><br>
David,<br>
<br>
Thanks for bringing the discussion here with is more topical for Rcpp and<br>
RInside.<br>
<div><div></div><div class="h5"><br>
On 12 July 2010 at 16:34, David Rosengarten wrote:<br>
| Hi,<br>
|<br>
| I originally emailed the r-sig-debian list and was directed here. I am<br>
| trying to run the examples in /RInside/examples/standard such as<br>
| rinside_sample_0, but I am getting the error: <br>
|<br>
| error while loading shared libraries: libR.so: cannot open shared object file:<br>
| No such file or directory<br>
|<br>
| Does anyone know how to deal with this? I was told to include the output of<br>
| 'make' and 'ldd ./rinside_sample0', so they are as follows:<br>
|<br>
| g++ -I/usr/share/R/include -I/usr/local/lib/R/site-library/Rcpp/include -I/usr/<br>
| local/lib/R/site-library/RInside/lib -g -O2 -Wall -s rinside_sample0.cpp<br>
| -L/usr/lib64/R/lib -lR -lblas -llapack -L/usr/local/lib/R/site-library/Rcpp/<br>
| lib -lRcpp -Wl,-rpath,/usr/local/lib/R/site-library/Rcpp/lib -L/usr/local/lib/R<br>
| /site-library/RInside/lib -lRInside -Wl,-rpath,/usr/local/lib/R/site-library/<br>
| RInside/lib -o rinside_sample0<br>
| g++ -I/usr/share/R/include -I/usr/local/lib/R/site-library/Rcpp/include -I/usr/<br>
| local/lib/R/site-library/RInside/lib -g -O2 -Wall -s rinside_sample1.cpp<br>
| -L/usr/lib64/R/lib -lR -lblas -llapack -L/usr/local/lib/R/site-library/Rcpp/<br>
| lib -lRcpp -Wl,-rpath,/usr/local/lib/R/site-library/Rcpp/lib -L/usr/local/lib/R<br>
| /site-library/RInside/lib -lRInside -Wl,-rpath,/usr/local/lib/R/site-library/<br>
| RInside/lib -o rinside_sample1<br>
| g++ -I/usr/share/R/include -I/usr/local/lib/R/site-library/Rcpp/include -I/usr/<br>
| local/lib/R/site-library/RInside/lib -g -O2 -Wall -s rinside_sample2.cpp<br>
| -L/usr/lib64/R/lib -lR -lblas -llapack -L/usr/local/lib/R/site-library/Rcpp/<br>
| lib -lRcpp -Wl,-rpath,/usr/local/lib/R/site-library/Rcpp/lib -L/usr/local/lib/R<br>
| /site-library/RInside/lib -lRInside -Wl,-rpath,/usr/local/lib/R/site-library/<br>
| RInside/lib -o rinside_sample2<br>
| g++ -I/usr/share/R/include -I/usr/local/lib/R/site-library/Rcpp/include -I/usr/<br>
| local/lib/R/site-library/RInside/lib -g -O2 -Wall -s rinside_sample3.cpp<br>
| -L/usr/lib64/R/lib -lR -lblas -llapack -L/usr/local/lib/R/site-library/Rcpp/<br>
| lib -lRcpp -Wl,-rpath,/usr/local/lib/R/site-library/Rcpp/lib -L/usr/local/lib/R<br>
| /site-library/RInside/lib -lRInside -Wl,-rpath,/usr/local/lib/R/site-library/<br>
| RInside/lib -o rinside_sample3<br>
| g++ -I/usr/share/R/include -I/usr/local/lib/R/site-library/Rcpp/include -I/usr/<br>
| local/lib/R/site-library/RInside/lib -g -O2 -Wall -s rinside_sample4.cpp<br>
| -L/usr/lib64/R/lib -lR -lblas -llapack -L/usr/local/lib/R/site-library/Rcpp/<br>
| lib -lRcpp -Wl,-rpath,/usr/local/lib/R/site-library/Rcpp/lib -L/usr/local/lib/R<br>
| /site-library/RInside/lib -lRInside -Wl,-rpath,/usr/local/lib/R/site-library/<br>
| RInside/lib -o rinside_sample4<br>
| g++ -I/usr/share/R/include -I/usr/local/lib/R/site-library/Rcpp/include -I/usr/<br>
| local/lib/R/site-library/RInside/lib -g -O2 -Wall -s rinside_sample5.cpp<br>
| -L/usr/lib64/R/lib -lR -lblas -llapack -L/usr/local/lib/R/site-library/Rcpp/<br>
| lib -lRcpp -Wl,-rpath,/usr/local/lib/R/site-library/Rcpp/lib -L/usr/local/lib/R<br>
| /site-library/RInside/lib -lRInside -Wl,-rpath,/usr/local/lib/R/site-library/<br>
| RInside/lib -o rinside_sample5<br>
| g++ -I/usr/share/R/include -I/usr/local/lib/R/site-library/Rcpp/include -I/usr/<br>
| local/lib/R/site-library/RInside/lib -g -O2 -Wall -s rinside_sample6.cpp<br>
| -L/usr/lib64/R/lib -lR -lblas -llapack -L/usr/local/lib/R/site-library/Rcpp/<br>
| lib -lRcpp -Wl,-rpath,/usr/local/lib/R/site-library/Rcpp/lib -L/usr/local/lib/R<br>
| /site-library/RInside/lib -lRInside -Wl,-rpath,/usr/local/lib/R/site-library/<br>
| RInside/lib -o rinside_sample6<br>
| g++ -I/usr/share/R/include -I/usr/local/lib/R/site-library/Rcpp/include -I/usr/<br>
| local/lib/R/site-library/RInside/lib -g -O2 -Wall -s rinside_sample7.cpp<br>
| -L/usr/lib64/R/lib -lR -lblas -llapack -L/usr/local/lib/R/site-library/Rcpp/<br>
| lib -lRcpp -Wl,-rpath,/usr/local/lib/R/site-library/Rcpp/lib -L/usr/local/lib/R<br>
| /site-library/RInside/lib -lRInside -Wl,-rpath,/usr/local/lib/R/site-library/<br>
| RInside/lib -o rinside_sample7<br>
| g++ -I/usr/share/R/include -I/usr/local/lib/R/site-library/Rcpp/include -I/usr/<br>
| local/lib/R/site-library/RInside/lib -g -O2 -Wall -s rinside_sample8.cpp<br>
| -L/usr/lib64/R/lib -lR -lblas -llapack -L/usr/local/lib/R/site-library/Rcpp/<br>
| lib -lRcpp -Wl,-rpath,/usr/local/lib/R/site-library/Rcpp/lib -L/usr/local/lib/R<br>
| /site-library/RInside/lib -lRInside -Wl,-rpath,/usr/local/lib/R/site-library/<br>
| RInside/lib -o rinside_sample8<br>
| g++ -I/usr/share/R/include -I/usr/local/lib/R/site-library/Rcpp/include -I/usr/<br>
| local/lib/R/site-library/RInside/lib -g -O2 -Wall -s rinside_test0.cpp -L<br>
| /usr/lib64/R/lib -lR -lblas -llapack -L/usr/local/lib/R/site-library/Rcpp/lib<br>
| -lRcpp -Wl,-rpath,/usr/local/lib/R/site-library/Rcpp/lib -L/usr/local/lib/R/<br>
| site-library/RInside/lib -lRInside -Wl,-rpath,/usr/local/lib/R/site-library/<br>
| RInside/lib -o rinside_test0<br>
| g++ -I/usr/share/R/include -I/usr/local/lib/R/site-library/Rcpp/include -I/usr/<br>
| local/lib/R/site-library/RInside/lib -g -O2 -Wall -s rinside_test1.cpp -L<br>
| /usr/lib64/R/lib -lR -lblas -llapack -L/usr/local/lib/R/site-library/Rcpp/lib<br>
| -lRcpp -Wl,-rpath,/usr/local/lib/R/site-library/Rcpp/lib -L/usr/local/lib/R/<br>
| site-library/RInside/lib -lRInside -Wl,-rpath,/usr/local/lib/R/site-library/<br>
| RInside/lib -o rinside_test1<br>
|<br>
| linux-vdso.so.1 => (0x00007fff30bff000)<br>
| libR.so => not found<br>
| libblas.so.3gf => /usr/lib/atlas/libblas.so.3gf (0x00007f50d2512000)<br>
| liblapack.so.3gf => /usr/lib/atlas/liblapack.so.3gf (0x00007f50d190a000)<br>
| libRcpp.so => /usr/local/lib/R/site-library/Rcpp/lib/libRcpp.so<br>
| (0x00007f50d16b2000)<br>
| libRInside.so => /usr/local/lib/R/site-library/RInside/lib/libRInside.so<br>
| (0x00007f50d149d000)<br>
| libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x00007f50d1188000)<br>
| libm.so.6 => /lib/libm.so.6 (0x00007f50d0f05000)<br>
| libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x00007f50d0cee000)<br>
| libc.so.6 => /lib/libc.so.6 (0x00007f50d096a000)<br>
| libgfortran.so.3 => /usr/lib/libgfortran.so.3 (0x00007f50d067d000)<br>
| /lib64/ld-linux-x86-64.so.2 (0x00007f50d2ecd000)<br>
| libR.so => not found<br>
| libR.so => not found<br>
<br>
</div></div>There is your problem.<br>
<div class="im"><br>
| I have R and r-base-dev installed, so I don't understand why this is happening.<br>
| Any help would be much appreciated.<br>
<br>
</div>You may have R, but I suspect you do not have R built with shared libraries.<br>
The quickest fix, given that you started on r-sig-debian, may be<br>
<br>
$ sudo apt-get install r-base-core<br>
<br>
Else you can of course rebuild R from source etc, but you have to tell<br>
configure to use --enable-R-shlib or else you cannot embed R. And<br>
RInside wants to embed R, so you can't the latter witout the former.<br>
<br>
Hope this helps.<br>
<font color="#888888"><br>
--<br>
Regards, Dirk<br>
</font></blockquote></div><br>