问题:尝试使用 make 构建 Julia 语言的错误消息

这是我第一次使用make。我正在尝试安装 Julia 语言。所以我从 GitHub 克隆

git clone git://github.com/JuliaLang/julia.git

然后指令说进入Julia目录并输入make。它运行了很长时间 - 我吃了一个披萨。

当我回来时,输入Julia不起作用。在安装快结束时,我收到一条很长的错误消息:

 /usr/bin/install -c -m 644 libpcre.pc libpcreposix.pc libpcrecpp.pc '/home/john/Downloads/julia/usr/lib/pkgconfig'
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   130  100   130    0     0    243      0 --:--:-- --:--:-- --:--:--   337
  0     0    0 8773k    0     0   310k      0 --:--:--  0:00:28 --:--:--     0
curl: (28) Operation too slow. Less than 1 bytes/sec transferred the last 15 seconds
curl: (6) name lookup timed out
make[2]: *** [openblas-v0.2.8.tar.gz] Error 6
make[1]: *** [julia-release] Error 2
make: *** [release] Error 2

我尝试了sudo make- 将sudo放在前面似乎可以解决所有问题,但不是这样:

gzip: stdin: unexpected end of file
tar: Unexpected EOF in archive
tar: Unexpected EOF in archive
tar: Error is not recoverable: exiting now
make[2]: *** [openblas-v0.2.8/config.status] Error 2
make[1]: *** [julia-release] Error 2
make: *** [release] Error 2

我可以采取哪些步骤来确保 Julia 正确安装?

我需要 2.0 版,所以我可以将iJulia与我的 iPython 笔记本一起使用。如果有更简单的方法而不直接编译,我会这样做。

解答

问题是makefile 正在尝试下载文件(curl是一个命令行程序,其作用类似于网络浏览器,通常用于从网站下载文件)。

但是,无论出于何种原因(可能是互联网太累了),下载失败并超时。

它现在因 unexpected end of file 错误而失败的原因是 (a) 下载在失败之前为您提供了文件的一部分,并且 (b) 您使用的 makefile 编写错误,因此它没有清理失败时部分下载的文件。

因此,该文件存在,因此 make 不会尝试下载它,但它只是部分的,因此当您尝试解压缩它时,它会失败。

您应该删除它尝试手动下载的文件(使用rm -f openblas-v0.2.8.tar.gz之类的文件),然后重新运行 make。也许互联网已经醒来,或者喝了一些咖啡,这次下载可以正常工作。

Logo

ModelScope旨在打造下一代开源的模型即服务共享平台,为泛AI开发者提供灵活、易用、低成本的一站式模型服务产品,让模型应用更简单!

更多推荐