Discussion:
[R-sig-Debian] Problem Upgrading to R 3.5 on Ubuntu 18.04
Elizabeth Tighe
2018-11-28 17:37:02 UTC
Permalink
Somehow during the process of updating both Ubuntu and R to the latest
versions I ended up with a version of R 3.5 installed into the sudo
user's home directory with default libraries set to the sudo user home
directory as well (/home/uname/R/x86_64-pc-linux-gnu-library/3.5 rather
than usr/local/lib/R/site-library).

I've tried to remove using sudo apt purge r-base r-base-dev and get a
message that the software is not installed. If I type "R" it opens
version 3.5.  If I go to Ubuntu's graphical interface as sudo user,
Software library, R is listed as installed and if I click on the
"Remove" button, nothing happens ...

Any suggestions on how to expunge this rogue installation and start anew?

Thanks,
Liz
--
Elizabeth Tighe, Ph.D.
Research Scientist
Steinhardt Social Research Institute
Brandeis University
781.736.3824
Dirk Eddelbuettel
2018-11-28 18:12:06 UTC
Permalink
On 28 November 2018 at 12:37, Elizabeth Tighe wrote:
| Somehow during the process of updating both Ubuntu and R to the latest
| versions I ended up with a version of R 3.5 installed into the sudo
| user's home directory with default libraries set to the sudo user home
| directory as well (/home/uname/R/x86_64-pc-linux-gnu-library/3.5 rather
| than usr/local/lib/R/site-library).

"Hate when that happens" :)

| I've tried to remove using sudo apt purge r-base r-base-dev and get a
| message that the software is not installed. If I type "R" it opens
| version 3.5.  If I go to Ubuntu's graphical interface as sudo user,
| Software library, R is listed as installed and if I click on the
| "Remove" button, nothing happens ...
|
| Any suggestions on how to expunge this rogue installation and start anew?

What you had (and what you want, if I read the message correctly) is an
explicit setting for (e.g.) .libPaths() which I like, but which I can't
"enforce" in the package -- I once tried about 1 1/2 years ago and all broke
loose because those who had ~/R/... path no longer saw it.

So now again, and as it had been since the 2000s, this is governed by a
setting in eg

/etc/R/Renviron.site

which is a convenience symbolic link to

/usr/lib/R/etc/Renviron.site

The file has comments, so see those. My (personal) version just comments the
settings out so that I get

R> .libPaths()
[1] "/usr/local/lib/R/site-library" "/usr/lib/R/site-library" "/usr/lib/R/library"
R>

Now, the tricky bit that R allows half a dozen ways to influence this -- see
help(Startup) in R for all the gory details. So I fiddling with
Renviron.site does not influence a fresh R session you will need to trace
want on your box does -- "dotfiles" can be sourced from the current
directory, the home directory, the /etc/ directory, ... and environment
variables enter too.

Keep us posted, hope this gets you started.

Dirk
--
http://dirk.eddelbuettel.com | @eddelbuettel | ***@debian.org
Elizabeth Tighe
2018-11-28 19:49:13 UTC
Permalink
Thanks Dirk!  The prior install and updates had been running fine for so
long I forgot all about the documentation on Renviron, Startup, etc.! 
Thanks.  Will changing the libPaths in Renviron.site help with the issue
that the operating system doesn't seem to recognize the installation re:
message that the "software is not installed" when I tried to remove it? 
Also what does it mean in your note when you say: "you will need to
trace want on your box does"?

Thanks!

Liz
Post by Dirk Eddelbuettel
| Somehow during the process of updating both Ubuntu and R to the latest
| versions I ended up with a version of R 3.5 installed into the sudo
| user's home directory with default libraries set to the sudo user home
| directory as well (/home/uname/R/x86_64-pc-linux-gnu-library/3.5 rather
| than usr/local/lib/R/site-library).
"Hate when that happens" :)
| I've tried to remove using sudo apt purge r-base r-base-dev and get a
| message that the software is not installed. If I type "R" it opens
| version 3.5.  If I go to Ubuntu's graphical interface as sudo user,
| Software library, R is listed as installed and if I click on the
| "Remove" button, nothing happens ...
|
| Any suggestions on how to expunge this rogue installation and start anew?
What you had (and what you want, if I read the message correctly) is an
explicit setting for (e.g.) .libPaths() which I like, but which I can't
"enforce" in the package -- I once tried about 1 1/2 years ago and all broke
loose because those who had ~/R/... path no longer saw it.
So now again, and as it had been since the 2000s, this is governed by a
setting in eg
/etc/R/Renviron.site
which is a convenience symbolic link to
/usr/lib/R/etc/Renviron.site
The file has comments, so see those. My (personal) version just comments the
settings out so that I get
R> .libPaths()
[1] "/usr/local/lib/R/site-library" "/usr/lib/R/site-library" "/usr/lib/R/library"
R>
Now, the tricky bit that R allows half a dozen ways to influence this -- see
help(Startup) in R for all the gory details. So I fiddling with
Renviron.site does not influence a fresh R session you will need to trace
want on your box does -- "dotfiles" can be sourced from the current
directory, the home directory, the /etc/ directory, ... and environment
variables enter too.
Keep us posted, hope this gets you started.
Dirk
--
Elizabeth Tighe, Ph.D.
Research Scientist
Steinhardt Social Research Institute
Brandeis University
781.736.3824
Dirk Eddelbuettel
2018-11-28 20:27:58 UTC
Permalink
On 28 November 2018 at 14:49, Elizabeth Tighe wrote:
|
| Thanks Dirk!  The prior install and updates had been running fine for so
| long I forgot all about the documentation on Renviron, Startup, etc.! 
| Thanks.  Will changing the libPaths in Renviron.site help with the issue
| that the operating system doesn't seem to recognize the installation re:
| message that the "software is not installed" when I tried to remove it? 
| Also what does it mean in your note when you say: "you will need to
| trace want on your box does"?

Sorry bad habit of typing replies when doing something else and not
proofreading before sending -- my bad. Meant to say that you may have to
chase where you system (re-)sets and overrides in case changing the value
in Renviron.site does not propagate. Also make sure you test on fresh
sessions so something like

edit somefile
Rscript -e 'print(.libPaths())'

is recommended as the file change will never alter a running session.

Dirk
--
http://dirk.eddelbuettel.com | @eddelbuettel | ***@debian.org
Loading...