cancel
Showing results forย 
Search instead forย 
Did you mean:ย 
Data Engineering
Join discussions on data engineering best practices, architectures, and optimization strategies within the Databricks Community. Exchange insights and solutions with fellow data engineers.
cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

Failed R install package of survminer in Databricks 10.4 LTS

Ross
New Contributor II

I am trying to install the survminer package but I get a non-zero exit status. It may be due to the jpeg package which is a pre-requisite but this also fails when installing independently.

install.packages("survminer", repos = "https://cran.microsoft.com/snapshot/2022-06-24/")

The resulting error is as follows:

* installing *source* package โ€˜SparseMโ€™ ...
** package โ€˜SparseMโ€™ successfully unpacked and MD5 sums checked
** using staged installation
** libs
gfortran -fno-optimize-sibling-calls  -fpic  -g -O2 -fdebug-prefix-map=/build/r-base-i2PIHO/r-base-4.1.2=. -fstack-protector-strong  -c bckslv.f -o bckslv.o
gfortran -fno-optimize-sibling-calls  -fpic  -g -O2 -fdebug-prefix-map=/build/r-base-i2PIHO/r-base-4.1.2=. -fstack-protector-strong  -c chol.f -o chol.o
gfortran -fno-optimize-sibling-calls  -fpic  -g -O2 -fdebug-prefix-map=/build/r-base-i2PIHO/r-base-4.1.2=. -fstack-protector-strong  -c chol2csr.f -o chol2csr.o
gfortran -fno-optimize-sibling-calls  -fpic  -g -O2 -fdebug-prefix-map=/build/r-base-i2PIHO/r-base-4.1.2=. -fstack-protector-strong  -c cholesky.f -o cholesky.o
cholesky.f:2948:72:
 
.....................
 
Warning in utils::install.packages(pkgs, ...) :
  installation of package โ€˜jpegโ€™ had non-zero exit status
Warning in utils::install.packages(pkgs, ...) :
  installation of package โ€˜gridtextโ€™ had non-zero exit status
Warning in utils::install.packages(pkgs, ...) :
  installation of package โ€˜ggtextโ€™ had non-zero exit status
Warning in utils::install.packages(pkgs, ...) :
  installation of package โ€˜survminerโ€™ had non-zero exit status
 
The downloaded source packages are in
	โ€˜/tmp/RtmpugpJqZ/downloaded_packagesโ€™

1 REPLY 1

shan_chandra
Databricks Employee
Databricks Employee

@Ross Hamiltonโ€‹ - Please follow the below steps in the given order

  • Run the below init script in an isolated notebook and add the init script to the issue cluster > Advanced options > Init Scripts
%python 
dbutils.fs.put("/tmp/test/init_script.sh","""
#!/bin/bash 
apt-get update
apt-get -y install libjpeg-dev
""")
  • From CRAN, add the dependent libraries jpeg, gridtext, ggtext to the cluster
  • add survminer from CRAN to the cluster or use the below command in an isolated notebook attached to the cluster
%r 
install.packages("survminer")

Connect with Databricks Users in Your Area

Join a Regional User Group to connect with local Databricks users. Events will be happening in your city, and you wonโ€™t want to miss the chance to attend and share knowledge.

If there isnโ€™t a group near you, start one and help create a community that brings people together.

Request a New Group