Dataiku DSS 7 AMA is live! Learn more

Setting Up R Code Environment for Use Case 5: ERR_CODEENV_UPDATE_FAILED

Level 2
Setting Up R Code Environment for Use Case 5: ERR_CODEENV_UPDATE_FAILED
Jump to solution

Hi,



I'm trying to set up the R coding environment for Use Case 5, i.e. I need the packages: Dplyr, GGplot2 and GGmap, Forecast, Lubridate, Purr (optional) and Tidyr.



I was able to set up a R coding environment as described in: https://answers.dataiku.com/2889/getting-error-while-setting-new-environment-code-envs-in-dss?show=2889#q2889



I tried to install to required packages via "packages to install", see image:





When clicking on "save and update", I get the Error:



"Environment update failed

ERR_CODEENV_UPDATE_FAILED

/home/dataiku/dataiku-dss-5.0.3/resources/code-envs/r/install-packages-if-needed.sh failed (exit code: 1)"



I assume that only some packages are a problem, e.g. "ggmap", probably as can be seen from the log



Last few lines of the log (unforetunately I cannot post the complete log here):



No version requested for dplyr considering installed version OK:0.8.0.1

No version requested for ggplot2 considering installed version OK:3.1.0

Package not installed: ggmap

Package not installed: forecast

No version requested for lubridate considering installed version OK:1.7.4

Package not installed: purr

No version requested for tidyr considering installed version OK:0.8.2

No version requested for dplyr considering installed version OK:0.8.0.1

No version requested for httr considering installed version OK:1.4.0

No version requested for gtools considering installed version OK:3.8.1

No version requested for IRkernel considering installed version OK:0.8.15

Error: at least one package failed to install required version

In addition: Warning messages:

1: In install.packages(toInstall, "/home/dataiku/dss/code-envs/R/newTestTSA/R.lib",  :

  installation of package ‘RgoogleMaps’ had non-zero exit status

2: In install.packages(toInstall, "/home/dataiku/dss/code-envs/R/newTestTSA/R.lib",  :

  installation of package ‘jpeg’ had non-zero exit status

3: In install.packages(toInstall, "/home/dataiku/dss/code-envs/R/newTestTSA/R.lib",  :

  installation of package ‘ggmap’ had non-zero exit status

4: In install.packages(toInstall, "/home/dataiku/dss/code-envs/R/newTestTSA/R.lib",  :

  installation of package ‘forecast’ had non-zero exit status

Execution halted



 



There seem to be some problems with dependencies (taken from log further above):



    white.test                              html  

** building package indices

** testing if installed package can be loaded

* DONE (tseries)

ERROR: dependencies ‘RgoogleMaps’, ‘png’, ‘jpeg’ are not available for package ‘ggmap’

* removing ‘/home/dataiku/dss/code-envs/R/newTestTSA/R.lib/ggmap’

ERROR: dependency ‘timeDate’ is not available for package ‘forecast’

* removing ‘/home/dataiku/dss/code-envs/R/newTestTSA/R.lib/forecast’

0 Kudos
5 Replies
Level 2
Author

I think I was able to track down the problem.



Even though it first looked like a network issue ("can't resolve host name"), I guess it was actually something else that caused the error:



ggmap depends on the "png" and "jpeg" package, which I was not able to install on the DSS machine ("... is not available for R 3.5.1"), I guess this caused the whole installation to fail. So for "png", i needed to install additional developer tools, in that case




yum install libpng-devel


(outside of R on the DSS machine) and for "jpeg" I needed




yum install libjpeg-turbo-devel


After these two commands, I was able to install ggmap and somehow also the other packages. Now I'm able to load all the packages in the Jupyter Notebook for R.

0 Kudos
Dataiker
Dataiker
Hi,

Please use the chat window on our website to post the complete log. Unfortunately, R has a big tendency to keep writing thousands of lines of logs after a first fatal error
0 Kudos
Level 2
Author
Thank you, I sent it there as a .log-file
0 Kudos
Dataiker
Dataiker
Hi,

Can you try re-running the R integration step: https://doc.dataiku.com/dss/latest/installation/r.html. And then rebuild the code environment?

If you get an error at one of these steps, please post the full log to this thread.

Cheers,

Alex
0 Kudos
Level 2
Author
Already tried to re-run the R integration step as well as rebuilding the code environment. Same error + log. I will post the log to the chat window as propsed below (log is >1700 lines). Thanks!
0 Kudos
Labels (2)