[英]Unable to use some packages on Databricks R Notebook
I tried a lot to solve my problems through the previous questions of stackoverflow, and using other sites, but I failed.我通过之前的stackoverflow问题以及使用其他网站尝试了很多解决我的问题,但我失败了。 Thus, my problems are as follows:
因此,我的问题如下:
I am trying to install the ggmap package:我正在尝试安装ggmap package:
install.packages("ggmap", lib="/databricks/spark/R/lib")
but I get this error:但我收到此错误:
rjcommon.h:11:10: fatal error:jpeglib.h: No such file or directory
Maybe useful info:也许有用的信息:
x64 Windows 10
R version 4.1.1 (2021-08-10)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 20.04.3 LTS
Matrix products: default
BLAS: /usr/lib/x86_64-linux-gnu/blas/libblas.so.3.9.0
LAPACK: /usr/lib/x86_64-linux-gnu/lapack/liblapack.so.3.9.0
[1]"/local_disk0/.ephemeral_nfs/envs/rEnv-adfa3b9f-34f8-4494-af74-4cf4c85bece3"
[2] "/databricks/spark/R/lib"
[3] "/local_disk0/.ephemeral_nfs/cluster_libraries/r"
[4] "/usr/local/lib/R/site-library"
[5] "/usr/lib/R/site-library"
[6] "/usr/lib/R/library"
I was also trying to install the GADMTools package:我还尝试安装GADMTools package:
install.packages("GADMTools", lib="/databricks/spark/R/lib")
and the errors were as follows:错误如下:
Configuration failed because libudunits2.so was not found and
configure: error: gdal-config not found or not executable
The ggmap package I tried to install it through terminal: ggmap package 我尝试通过终端安装它:
PS C:\Users\olthpor\scoop\buckets\main>sudo apt-get install libjpeg-dev
and the result was:结果是:
Start-process: This command cannot be run due to the error: The system cannot find the file
specified.
At C:\Users\olthpor\Documents\Scripts\sudo.ps1:1 char:103
+...ngth -gt 1){start-process arg[0]-ArgumentList args[1...args.Lengt...
+ CategoryInfo : InvalidOperation:(:)[Start-process], InvalidOperationException
+ FullyQualifiedErrorId: InvalidOperationException,
Microsoft.PowerShell.Commands.StartProcessCommand
I'm irrelevant to use Linux commands on Windows.我与在 Windows 上使用 Linux 命令无关。
The problem is that some system packages aren't installed that are required for compilation of your R packages.问题是没有安装编译 R 包所需的某些系统包。 Like,
libjpeg-dev
for ggmap
, etc.比如,用于
ggmap
libjpeg-dev
等。
You can solve problem as following:您可以解决以下问题:
%sh
apt-get update
apt-get -y install libjpeg-dev
#!/bin/bash
apt-get update
apt-get -y install libjpeg-dev
install this script as described in documentation, and restart the cluster.按照文档中的说明安装此脚本,然后重新启动集群。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.