Rolf Turner
2018-Aug-23 11:34 UTC
[R] R shared library (/usr/lib64/R/lib/libR.so) not found.
On 08/23/2018 11:09 PM, Jan T Kim via R-help wrote:> Hi Rolf & All, > > I haven't built R in a while, but my general expectation of an > autotools based build & install would be that the default prefix > is /usr/local, rather than /usr. So I'd expect the shared libs > in /usr/local/lib, /usr/local/lib64 etc.I guess I should have said --- I did sudo make prefix=/usr install which puts stuff into /usr rather than into /usr/local. I forget exactly why I chose (in the dim distant past) to do this ... I have a vague recollection that my search path was more "comfortable" that way.> I also have a recollection that I once installed Rstudio for some > MOOC, and ended up putting a symlink in somewhere like /usr/lib* , > because Rstudio was only available as a binary with the location > of the shared lib hard-baked into it.So it looks like a symlink might be the answer for me. I would still like to know why /usr/lib/R/lib/libR.so was not refreshed on the most recent build, but.> Depending on your <various flags> this may be irrelevant, apologies > in that case.Not to worry. Thanks for taking an interest. cheers, Rolf -- Technical Editor ANZJS Department of Statistics University of Auckland Phone: +64-9-373-7599 ext. 88276
Berwin A Turlach
2018-Aug-23 14:26 UTC
[R] R shared library (/usr/lib64/R/lib/libR.so) not found.
G'day Rolf, On Thu, 23 Aug 2018 23:34:38 +1200 Rolf Turner <r.turner at auckland.ac.nz> wrote:> I guess I should have said --- I did > > sudo make prefix=/usr install > > which puts stuff into /usr rather than into /usr/local.??? I do not remember ever specifying "prefix=foo" at the make install stage. Not for any software that uses autoconf &c. I thought the prefix should be specified to ./configure and after that just make make check make install I am pretty sure that the location of RHOME is set by the path specified (explicitly or implicitly) to ./configure. If you then install R at another location with your construct, some problems seem to be pre-programmed. But I could be wrong.> I forget exactly why I chose (in the dim distant past) to do this ... > I have a vague recollection that my search path was more > "comfortable" that way.In my experience this is a false comfort. Set the search path so that /opt/bin or /usr/local/bin is early on and finds programs you install to those location. Installing to /usr will sooner or later lead to tears if your program "conflicts" with some Ubuntu package (which might have been installed to satisfy the requirement of another package that you needed). If that package is update during an "apt-get update", you can end up with a broken system.> > I also have a recollection that I once installed Rstudio for some > > MOOC, and ended up putting a symlink in somewhere like /usr/lib* , > > because Rstudio was only available as a binary with the location > > of the shared lib hard-baked into it.The location is only hard-coded in relation to RHOME and with the assumption that you are not using a sub-architecture on Ubuntu. AFAIK, binary Ubuntu distributions of R do not use sub-architectures and there should be no problem on an Ubuntu system as long as all software is installed via Ubuntu. But this is probably a question better discussed on r-sig-Debian> So it looks like a symlink might be the answer for me.Only if you can be sure that that libR.so is compatible with the R version that you seem to be using. The official r-base-core package from Ubuntu seems to be R 3.4.4. If you added the CRAN repository to your Ubuntu system, you might have a newer version installed. But if your installation is partly a self-compiled R-3.5.1 version that is then linked to an R 3.4.4 libR.so in /usr/lib/R/lib/ (from r-cran-base), you are inviting trouble. Cheers, Berwin
Peter Langfelder
2018-Aug-23 15:45 UTC
[R] R shared library (/usr/lib64/R/lib/libR.so) not found.
On Thu, Aug 23, 2018 at 7:33 AM Berwin A Turlach <berwin.turlach at gmail.com> wrote:> > G'day Rolf, > > On Thu, 23 Aug 2018 23:34:38 +1200 > Rolf Turner <r.turner at auckland.ac.nz> wrote: > > > I guess I should have said --- I did > > > > sudo make prefix=/usr install > > > > which puts stuff into /usr rather than into /usr/local. > > ??? > > I do not remember ever specifying "prefix=foo" at the make install > stage. Not for any software that uses autoconf &c. > > I thought the prefix should be specified to ./configure and after that > just > make > make check > make install > > I am pretty sure that the location of RHOME is set by the path > specified (explicitly or implicitly) to ./configure. If you then > install R at another location with your construct, some problems seem > to be pre-programmed. But I could be wrong.The manual, specifically https://cran.r-project.org/doc/manuals/r-release/R-admin.html#Installation documents this way of choosing the installation directory. Peter