尝试在 Rstudio 中安装 vcfR 时出错

Error when trying to install vcfR in Rstudio

我在 R studio 中安装 vcfR 包时遇到问题。 我在 Ubuntu 18.04.4 LTS in Rstudio 和我的 R 版本 3.6.3 当我尝试使用安装时:

install.packages('vcfR')

我得到一个非零退出状态

Installing package into ‘/home/username/R/x86_64-pc-linux-gnu-library/3.6’
(as ‘lib’ is unspecified)
trying URL 'http://cran.r-project.org/src/contrib/vcfR_1.11.0.tar.gz'
Content type 'application/x-gzip' length 1453180 bytes (1.4 MB)
==================================================
downloaded 1.4 MB

* installing *source* package ‘vcfR’ ...
** package ‘vcfR’ successfully unpacked and MD5 sums checked
** using staged installation
./configure: 4: ./configure: checkbashisms: not found
Warning in system(cmd) : error in running command
ERROR: configuration failed for package ‘vcfR’
* removing ‘/home/username/x86_64-pc-linux-gnu-library/3.6/vcfR’
Warning in install.packages :
  installation of package ‘vcfR’ had non-zero exit status

我不确定从这里到哪里去或尝试修复它。

我在 github 上发现了这个,显然这是一个普遍问题:

https://github.com/r-hub/rhub-linux-builders/issues/46

我也是 运行 Ubuntu 18.04.04,收到了和你一样的错误信息。我使用以下代码通过终端安装了 devscripts 包:

sudo apt update
sudo apt install devscripts

然后我就能够在 RStudio 中成功安装 vcfR。

这似乎是由于包 vcfR 中的一个简单错误造成的。在最新版本中 its configure script 包含

#!/bin/sh

#
checkbashisms --force

# EOF.

这几乎没有意义。 CRAN 从未注意到,因为他们现在安装了脚本 checkbashishm(来自 Debian 的 devscript 软件包)。有人应该告诉 vcfR 的维护者来纠正这个问题。我会给他发邮件。至少应该改为

if [ -f /usr/bin/checkbashisms ]; then
    checkbashisms --force
fi