【发布时间】:2022-07-12 09:09:56
【问题描述】:
我正在尝试安装光栅包以便能够在 RStudio 中运行模型 - 我正在使用 Ubuntu 20.04 和 R 4.2.1。每当我在 RStudio 控制台中运行install.packages(\'raster\') 时,我都会得到this error。我已经为 Ubuntu 安装了 r-cran-raster,正在使用 PPA,并尝试下载 raster 包以手动安装。
我对 R 和 Ubuntu 比较陌生,所以如果有任何关于尝试的建议,我将不胜感激!
来自install.packages(\'raster\') 的错误消息:
** R
** inst
** byte-compile and prepare package for lazy loading
in method for ‘brick’ with signature ‘x=\"kasc\"’: no definition for class “kasc”
in method for ‘brick’ with signature ‘x=\"grf\"’: no definition for class “grf”
in method for ‘coerce’ with signature ‘\"STFDF\",\"RasterBrick\"’: no definition for class “STFDF”
in method for ‘coerce’ with signature ‘\"STSDF\",\"RasterBrick\"’: no definition for class “STSDF”
in method for ‘coerce’ with signature ‘\"asc\",\"RasterLayer\"’: no definition for class “asc”
in method for ‘coerce’ with signature ‘\"RasterLayer\",\"asc\"’: no definition for class “asc”
in method for ‘coerce’ with signature ‘\"kasc\",\"RasterBrick\"’: no definition for class “kasc”
in method for ‘coerce’ with signature ‘\"kasc\",\"RasterStack\"’: no definition for class “kasc”
in method for ‘coerce’ with signature ‘\"kde\",\"RasterLayer\"’: no definition for class “kde”
in method for ‘coerce’ with signature ‘\"grf\",\"RasterBrick\"’: no definition for class “grf”
in method for ‘coerce’ with signature ‘\"grf\",\"RasterLayer\"’: no definition for class “grf”
in method for ‘extent’ with signature ‘x=\"bbox\"’: no definition for class “bbox”
in method for ‘extent’ with signature ‘x=\"sf\"’: no definition for class “sf”
in method for ‘extract’ with signature ‘x=\"Raster\",y=\"sf\"’: no definition for class “sf”
in method for ‘mask’ with signature ‘x=\"Raster\",mask=\"sf\"’: no definition for class “sf”
in method for ‘raster’ with signature ‘x=\"sf\"’: no definition for class “sf”
in method for ‘raster’ with signature ‘x=\"kasc\"’: no definition for class “kasc”
in method for ‘raster’ with signature ‘x=\"asc\"’: no definition for class “asc”
in method for ‘raster’ with signature ‘x=\"kde\"’: no definition for class “kde”
in method for ‘raster’ with signature ‘x=\"grf\"’: no definition for class “grf”
in method for ‘rasterize’ with signature ‘x=\"sf\",y=\"Raster\"’: no definition for class “sf”
Creating a generic function for ‘rowSums’ from package ‘base’ in package ‘raster’
Creating a generic function for ‘colSums’ from package ‘base’ in package ‘raster’
in method for ‘setValues’ with signature ‘x=\"RasterLayerSparse\"’: no definition for class “RasterLayerSparse”
in method for ‘stack’ with signature ‘x=\"kasc\"’: no definition for class “kasc”
munmap_chunk(): invalid pointer
Aborted (core dumped)
ERROR: lazy loading failed for package ‘raster’
* removing ‘/home/emmsage/R/x86_64-pc-linux-gnu-library/4.2/raster’
Warning in install.packages :
installation of package ‘raster’ had non-zero exit status
The downloaded source packages are in
‘/tmp/RtmpuqJnA5/downloaded_packages’
标签: r ubuntu-20.04 r-raster