R install.package() bug
Marco Atzeri
marco.atzeri@gmail.com
Sat Dec 2 18:29:14 GMT 2023
On 28/11/2023 06:01, Stephen P Carrier via Cygwin wrote:
> I would like to report an issue with install.packages() experienced today
> using the current R package.
>
> I installed R 4.3.0 on system:
>
> # uname -rs
> CYGWIN_NT-10.0-20348 3.4.9-1.x86_64
>
> I tried to install the DBI package, DBI_1.1.3.tar.gz, downloaded from a
> mirror.
>
> I used
>
> install.packages("/path/to/DBI_1.1.13.tar.gz", repos = NULL);
>
> What happens is:
>
> -----
> Installing package into ‘/usr/lib/R/site-library’
> (as ‘lib’ is unspecified)
> During startup - Warning message:
> package ‘stats’ in options("defaultPackages") was not found
> * installing *source* package ‘DBI’ ...
> ** package ‘DBI’ successfully unpacked and MD5 sums checked
> ** using staged installation
> Error : Invalid DESCRIPTION file
>
> Malformed maintainer field.
>
> See section 'The DESCRIPTION file' in the 'Writing R Extensions'
> manual.
> ERROR: installing package DESCRIPTION failed for package ‘DBI’
> -----
>
> I looked in the manual to see what DESCRIPTION files should look like. The
> encoding is specified as UTF-8 in the file so the umlauts sprinkled
> throughout should be fine. The 'Maintainer:' line contains an umlaut, I
> removed it, after which the package installed without error. Umlauts
> elsewhere in the DESCRIPTION file are not a problem.
>
> Seems like a bug. I don't have R 4.3.0 installed on a Linux system to test
> if the bug is upstream from Cygwin, and my immediate problem is solved with
> a simple workaround.
>
> Thanks to all for maintaining this fine product (Cygwin kernel and all the
> packages).
>
> --Stephen Carrier
It is an UTF8 issue, it will need some time to understand why
the code page interpretation is wrong for R and it is not using UTF8
As work around:
$ tar -xf DBI-1.1.3.tar.gz
$ cd DBI-1.1.3
$ grep Mü DESCRIPTION
person("Kirill", "Müller", , "krlmlr+r@mailbox.org", role =
c("aut", "cre"),
$ sed -e "s/Müller/Mueller/" -i DESCRIPTION
$ grep ller DESCRIPTION
person("Kirill", "Mueller", , "krlmlr+r@mailbox.org", role =
c("aut", "cre"),
$ cd ..
$ tar -xzf DBI-1.1.3.tar.gz DBI-1.1.3
and then in R:
> install.packages("/tmp/DBI-1.1.3.tar.gz", repos = NULL);
Installing package into ‘/usr/lib/R/site-library’
(as ‘lib’ is unspecified)
* installing *source* package ‘DBI’ ...
** using staged installation
** R
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
** building package indices
** installing vignettes
** testing if installed package can be loaded from temporary location
** testing if installed package can be loaded from final location
** testing if installed package keeps a record of temporary installation
path
* DONE (DBI)
Regards Marco
PS: I see only 1.1.3 on https://github.com/r-dbi/DBI/releases
More information about the Cygwin
mailing list