首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Travis-CI错误:安装nloptr pkg (r pkg检查)

Travis-CI错误:安装nloptr pkg (r pkg检查)
EN

Stack Overflow用户
提问于 2018-01-28 17:24:26
回答 2查看 110关注 0票数 3

我试着用travis-ci来检查我的r包是否正确。我的包裹应该进口r nloptr。而travis-ci将在"r":"oldrel“分支中给出错误。我在这里显示错误:

代码语言:javascript
复制
configure: Need to download and build NLopt
trying URL 'http://ab-initio.mit.edu/nlopt/nlopt-2.4.2.tar.gz'
Warning in download.file(url = "http://ab-initio.mit.edu/nlopt/nlopt-2.4.2.tar.gz",  :
  "internal" method cannot handle https redirection to: 'https://github.com/stevengj/nlopt/releases/download/nlopt-2.4.2/nlopt-2.4.2.tar.gz'
switching to method = "libcurl" because of redirection to https
downloaded 0 bytes
Warning in download.file(url = "http://ab-initio.mit.edu/nlopt/nlopt-2.4.2.tar.gz",  :
  URL 'https://github-production-release-asset-2e65be.s3.amazonaws.com/12412122/5dd09f0a-6d59-11e7-9685-af3ea1aac9be?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20180127%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20180127T205849Z&X-Amz-Expires=300&X-Amz-Signature=e6604ca4110973e167461335f8ffe6e340882219fd2a4ebc2a6065d4e416cc2e&X-Amz-SignedHeaders=host&actor_id=0&response-content-disposition=attachment%3B%20filename%3Dnlopt-2.4.2.tar.gz&response-content-type=application%2Foctet-stream': status was '403 Forbidden'
Error in download.file(url = "http://ab-initio.mit.edu/nlopt/nlopt-2.4.2.tar.gz",  : 
  cannot download all files
Execution halted
/bin/tar: This does not look like a tar archive
gzip: stdin: unexpected end of file
/bin/tar: Child returned status 1
/bin/tar: Error is not recoverable: exiting now
Warning message:
In untar(tarfile = "nlopt-2.4.2.tar.gz") :
  '/bin/tar -xf 'nlopt-2.4.2.tar.gz'' returned error code 2
configure: Starting to install library to /tmp/RtmpCm39nC/R.INSTALL37f361a5b719/nloptr/nlopt-2.4.2
./configure: line 3325: cd: nlopt-2.4.2: No such file or directory
EN

回答 2

Stack Overflow用户

回答已采纳

发布于 2018-03-14 18:31:17

您应该将以下内容添加到您的.travis.yml中,因为它将在基于容器的基础结构或标准基础结构中工作,而Chaoran的回答仅适用于标准基础结构:

代码语言:javascript
复制
addons:
  apt:
    packages:
      - libnlopt-dev

请参阅travis,以了解为什么这个答案会更普遍地工作:https://docs.travis-ci.com/user/languages/r/#APT-packages

票数 1
EN

Stack Overflow用户

发布于 2018-01-28 17:24:26

因此,问题是travis-ci不知道如何安装这个nlopt,这是r nloptr所需要的。(travis-ci不能通过给定的url下载nlopt。)幸运的是,我们可以通过将此代码添加到.travis.yml文件中来告诉travis-ci另一种方式,这有助于travis-ci通过另一种方式安装nlopt。

代码语言:javascript
复制
apt_packages:
  - libnlopt-dev

现在,特拉维斯-奇可以很好地为你服务!

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/48489235

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档