[R-sig-Debian] Advice on article about installing R on Linux

Michael Rutter m@rutter @end|ng |rom gm@||@com
Sat Mar 28 15:46:54 CET 2020



On 3/28/20 10:04 AM, Robin Lovelace wrote:
> To the list this time...
> 
> On Sat, Mar 28, 2020 at 2:03 PM Robin Lovelace <rob00x using gmail.com> wrote:
> 
>> Hi Dirk,
>>
>> Thanks for the quick response.
>>
>> I've updated the draft post following your suggestions, see the updated
>> version, in nice .md format, here:
>> https://github.com/geocompr/geocompr.github.io/blob/installing-on-linux/content/post/2020/installing-r-spatial-packages-linux.md
>>
>> Any better? I think so! The key bit for eoan users is this:
>>
>> sudo add-apt-repository 'deb https://cloud.r-project.org/bin/linux/ubuntu eoan-cran35/'
>> sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E298A3A825C0D65DFD57CBB651716619E084DAB9
>> sudo add-apt-repository ppa:marutter/c2d4u3.5
>> sudo apt update
>> sudo apt install r-base-dev r-cran-sf r-cran-raster r-cran-tmap
>>
>> Following your suggestion I have created a Dockerfile to test this:
>> https://github.com/Robinlovelace/geocompr/blob/master/docker/ubuntu-eoan/Dockerfile
>>
>> (Taken with credit from your rocker project work.)
>>
>> Unfortunately it fails with the following message:

Robin,

My suggestion would be to use the PPA for RRutter3.5 as opposed to the 
CRAN repository.  The PPA seeds CRAN, so the packages are the same, and 
eliminates the key issue.  Use:

sudo add-apt-repository ppa:marutter/rrutter3.5

This is also release agnostic, so when you move to focal (20.04), 
nothing needs to change.

Also, c2d4u doesn't exist for eoan.  It only exists for LTS releases 
(bionic, xenial, and fading carcass of trusty).  I will be building 
c2d4u for focal when that releases.

Michael



>> W: GPG error: https://cloud.r-project.org/bin/linux/ubuntu eoan-cran35/
>> InRelease: The following signatures couldn't be verified because the public
>> key is not available: NO_PUBKEY 51716619E084DAB9
>> E: The repository 'https://cloud.r-project.org/bin/linux/ubuntu
>> eoan-cran35/ InRelease' is not signed.
>>
>> Any ideas? I've tried various combinations mentioned here but not luck
>> yet: https://cran.r-project.org/bin/linux/ubuntu/#secure-apt
>>
>> Regarding Fedora, didn't know that. Is this the message you're referring
>> to? https://copr.fedorainfracloud.org/coprs/iucar/cran/
>>
>> I will add that link to this section if so:
>> https://github.com/geocompr/geocompr.github.io/blob/installing-on-linux/content/post/2020/installing-r-spatial-packages-linux.md#3-installing-geographic-r-packages-on-other-linux-operating-systems
>>
>> All the best,
>>
>> Robin
>>
>>
>>
>> On Sat, Mar 28, 2020 at 12:46 PM Dirk Eddelbuettel <edd using debian.org> wrote:
>>
>>>
>>> Hi Robin,
>>>
>>> On 28 March 2020 at 10:30, Robin Lovelace wrote:
>>> | Dear list,
>>> |
>>> | I've drafted an article on installing geographic R packages on Linux
>>> | computers and would appreciate any feedback. Is the following text
>>> correct,
>>> | useful and future-proof?:
>>> |
>>> | R’s spatial packages can be installed from source on recent (since
>>> Ubuntu
>>> | 19.04) versions of this popular operating system, once the appropriate
>>> | repository has been set-up, meaning faster install times (only a few
>>> | minutes including the installation of upstream dependencies). The
>>> following
>>> | bash commands should install key geographic R packages on Ubuntu 19.04,
>>> | 19.10 or 20.04:
>>>
>>> I wonder if we should provide these for "bionic" (18.04) and onwards as
>>> that
>>> is (for a few more weeks) the reigning LTS.  Also, saying 19.04 here and
>>> pointing to eoan sounds fishy. 19.04 is "disco" IIRC.
>>>
>>> I also *strongly* recommend you bullet-proof this by starting from a plain
>>> ubuntu:$VERSION container and test it.
>>>
>>> | sudo -i
>>> | echo 'deb https://cloud.r-project.org/bin/linux/ubuntu eoan-cran35/' |
>>> sudo
>>> | tee -a /etc/apt/sources.list
>>>
>>> The cool kids all use a new file in /etc/apt/sources.list.d/ now look in
>>> yours.  The you can just copy and/or shell redirect.
>>>
>>> | sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys
>>> | E298A3A825C0D65DFD57CBB651716619E084DAB9
>>>
>>> I never remember if apt-add-repository works with this too.
>>>
>>> | sudo apt update
>>> | sudo apt install r-base-dev r-cran-sf r-cran-raster r-cran-tmap
>>> |
>>> | If you are using an older version of Ubuntu and don’t want to upgrade to
>>> | the next Long Term Support release (20.04), see instructions at
>>> | github.com/r-spatial/sf.
>>> |
>>> | 3. Other operating systems
>>> | If you are in the fortunate position of switching to Linux and being
>>> able
>>> | to choose the distribution that best fits your needs, it’s worth
>>> thinking
>>> | about which distribution will be both user-friendly (more on that soon),
>>> | performant and future-proof. Ubuntu is a solid choice, with a large user
>>> | community and repositories such as ‘ubuntugis’ providing more up-to-date
>>> | versions of upstream geographic libraries such as GDAL.
>>> |
>>> | QGIS is also well-supported on on Ubuntu.
>>>
>>> And you could mention the Rutter PPA here -- another 4k binary packages!
>>>
>>> | However, you can install R and key geographic packages on other
>>> operating
>>> | systems, although it may take longer. Useful links on installing R and
>>> | geographic libraries are provided below for reference:
>>> |
>>> | Installing R on Debian is covered on the CRAN website. Upstream
>>> | dependencies such as GDAL can be installed on recent versions of Debian,
>>> | such as buster, with commands such as apt-get install libgdal-dev as per
>>> | instructions on the rocker/geospatial.
>>> |
>>> | Full article here:
>>> |
>>> https://github.com/geocompr/geocompr.github.io/blob/installing-on-linux/content/post/2020/installing-r-spatial-packages-linux.Rmd
>>>
>>> We could/should also shout out to Fedora who now have a repo with all
>>> (!!) of
>>> CRAN (!!) as per a recent email by Inaki "somewhere" (r-devel?
>>> r-pkg-devel?)
>>>
>>> | Planning to publish this on Monday, thanks in advance for any feedback.
>>>
>>> It's good. Sorry for not responding sooner. The raw Rmd was hard to read;
>>> I
>>> tend to just push .md to GitHub (when I have R-code free writeups like
>>> this
>>> which is almost all of them) as that is always rendered to read.
>>>
>>> Dirk
>>>
>>> | Robin
>>> |
>>> | P.s. I noticed in the process of writing this that eoan instructions are
>>> | missing here:
>>> |
>>> | https://cran.r-project.org/bin/linux/ubuntu/README.html
>>> |
>>> | Worth updating them?
>>> |
>>> |       [[alternative HTML version deleted]]
>>> |
>>> | _______________________________________________
>>> | R-SIG-Debian mailing list
>>> | R-SIG-Debian using r-project.org
>>> | https://stat.ethz.ch/mailman/listinfo/r-sig-debian
>>>
>>> --
>>> http://dirk.eddelbuettel.com | @eddelbuettel | edd using debian.org
>>>
>>
> 
> 	[[alternative HTML version deleted]]
> 
> _______________________________________________
> R-SIG-Debian mailing list
> R-SIG-Debian using r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-debian
>



More information about the R-SIG-Debian mailing list