[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: R install.packages() fails: 'Peer certificate cannot be authenticate

From: Ricardo Wurmus
Subject: Re: R install.packages() fails: 'Peer certificate cannot be authenticated with given CA certificates'
Date: Fri, 30 Sep 2016 09:08:35 +0200
User-agent: mu4e 0.9.16; emacs 25.1.1

myglc2 <address@hidden> writes:

> With GuixSD user config ...
> (use-package-modules
>  base   ; glibc-utf8-locales
>  ssh    ; mosh
>  admin  ; tree
>  aspell ; aspell-dict-en
>  mail   ; notmuch mu isync
>  statistics ; r
>  emacs      ; emacs-ess
>  certs      ; nss-certs
>  )
> (packages->manifest
>  (list
>   mosh
>   tree
>   aspell-dict-en ; because emacs doesn't find system install
>   notmuch mu isync ; also building from git source but this gets run-time 
> dependencies
>   r emacs-ess
>   r-devtools r-openssl r-stringr r-xml2 r-httr 
>   )
>  )

You forgot to actually add “nss-certs” to the manifest.  After adding
“nss-certs” you need to set the environment variable CURL_CA_BUNDLE:


(I only recently patched r-curl to respect this environment variable.
We should patch libcurl so that all packages using libcurl understand

Now installation works.  Or rather: it fails with a different error :)
You should also make sure that your manifest contains a suitable build
environment, possibly including “gcc-toolchain”, “gfortran”, and “make”.

If you’re on a foreign distro it is important that you have
“gcc-toolchain” in the profile when you want to use install.packages
because there are quite a few R packages that build bindings to system
libs.  Our toolchain will refuse linking with system libs, but if you
use the system GCC and linker you will only notice breakage at runtime
when trying to use the package.  Our linker’s refusal to link to libs of
the host system is a blessing here, because it spares you the trouble of
runtime breakage later on.

(Better than “install.packages” is to use Guix with “r-*” packages
instead.  I’ll try to add more in the near future, so that it’s an
easier choice to make.)

BTW: you can simplify your manifest if you reference packages by name
instead of variable name.  I like to use suggest something like this for
users at the MDC because it looks cleaner:

(define packages '("r"

;; Boilerplate code to turn the above list of packages into a manifest
(use-modules (gnu packages))
(packages->manifest (map specification->package packages))

Note that these package names can include version prefixes as in
address@hidden, which will get me the latest version of the Samtools 0.x
series instead of the latest version.

~~ Ricardo

reply via email to

[Prev in Thread] Current Thread [Next in Thread]