Error in installing spark with sparklyr package

Viewed 172

I am trying to install sparklyr on a Mac system (macOS Catalina); while running spark_install(), it starts downloading the packages, then it fails. Please see the following code to reproduce.

> library(sparklyr)
> packageVersion("sparklyr")
[1] ‘1.5.2’
> system("java -version")
java version "15.0.2" 2021-01-19
Java(TM) SE Runtime Environment (build 15.0.2+7-27)
Java HotSpot(TM) 64-Bit Server VM (build 15.0.2+7-27, mixed mode, sharing)
> spark_install("3.0")
Installing Spark 3.0.1 for Hadoop 3.2 or later.
Downloading from:
- 'https://archive.apache.org/dist/spark/spark-3.0.1/spark-3.0.1-bin-hadoop3.2.tgz'
Installing to:
- '~/spark/spark-3.0.1-bin-hadoop3.2'
trying URL 'https://archive.apache.org/dist/spark/spark-3.0.1/spark-3.0.1-bin-hadoop3.2.tgz'
Content type 'application/x-gzip' length 224062525 bytes (213.7 MB)
===========
downloaded 50.0 MB

Error in download.file(installInfo$packageRemotePath, destfile = installInfo$packageLocalPath,  : 
  download from 'https://archive.apache.org/dist/spark/spark-3.0.1/spark-3.0.1-bin-hadoop3.2.tgz' failed
1 Answers

I posted the question on sparklyr GitHub page, too. Yitao Li provided the following answer:

https://github.com/sparklyr/sparklyr/issues/2936

I repeat the answer here, it may help some others.

Run options(timeout=300) then reinstall the package.

Related