I'm at a loss a bit as I am new to creating/deploying ShinyApps. I have an app ready to deploy which does not directly use Terra package, but apparently the Leaflet package is dependent on Terra somehow.
I have tried both with and without library("terra") before I run my app, check whether it works, and deploy it, but I keep getting the same error somewhere along deploying.
── Deploying to server ──────────────────────────────────────────────────────────────────────────────────────────────────────────
Waiting for task: 1523094420
building: Processing bundle: 9984343
building: Parsing manifest
building: Building image: 12301650
building: Installing system dependencies
building: Fetching packages
building: Building package: terra
## Begin Task Log ###############################################################################################################
Quarto not found.
[2025-03-22T02:24:56.611974066+0000] Execute script: packages/build/units.sh
+ set -e
+ apt-get update -qq
W: : Key is stored in legacy trusted.gpg keyring (/etc/apt/trusted.gpg), see the DEPRECATION section in apt-key(8) for details.
+ apt-get install -y libudunits2-dev
Reading package lists...
Building dependency tree...
There's then about 200 lines of additional code where it's installing packages (somewhere?) like cpp11 and crayon etc. But it always ends with:
make: *** [/opt/R/4.3.2/lib/R/etc/Makeconf:200: RcppModule.o] Error 1
ERROR: compilation failed for package ‘terra’
* removing ‘/usr/lib/R/terra’## End Task Log #################################################################################################################
Error: Unhandled Exception: child_task=1523094421
child_task_status=failed: Error building image:
Error building terra (1.8-29). Build exited with non-zero status: 1
I'm not sure why it is trying to 'build' terra, since I have it installed and it works well. I don't think I have an oudated package or R version. See session info below
R version 4.3.2 (2023-10-31 ucrt)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 11 x64 (build 22631)
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] terra_1.8-29 rintrojs_0.3.4 sf_1.0-16 tidyr_1.3.1 dplyr_1.1.4 ggplot2_3.5.1 leaflet_2.2.2
[8] shinythemes_1.2.0 shiny_1.9.1
I'm at a loss a bit as I am new to creating/deploying ShinyApps. I have an app ready to deploy which does not directly use Terra package, but apparently the Leaflet package is dependent on Terra somehow.
I have tried both with and without library("terra") before I run my app, check whether it works, and deploy it, but I keep getting the same error somewhere along deploying.
── Deploying to server ──────────────────────────────────────────────────────────────────────────────────────────────────────────
Waiting for task: 1523094420
building: Processing bundle: 9984343
building: Parsing manifest
building: Building image: 12301650
building: Installing system dependencies
building: Fetching packages
building: Building package: terra
## Begin Task Log ###############################################################################################################
Quarto not found.
[2025-03-22T02:24:56.611974066+0000] Execute script: packages/build/units.sh
+ set -e
+ apt-get update -qq
W: http://cran.rstudio/bin/linux/ubuntu/jammy-cran40/InRelease: Key is stored in legacy trusted.gpg keyring (/etc/apt/trusted.gpg), see the DEPRECATION section in apt-key(8) for details.
+ apt-get install -y libudunits2-dev
Reading package lists...
Building dependency tree...
There's then about 200 lines of additional code where it's installing packages (somewhere?) like cpp11 and crayon etc. But it always ends with:
make: *** [/opt/R/4.3.2/lib/R/etc/Makeconf:200: RcppModule.o] Error 1
ERROR: compilation failed for package ‘terra’
* removing ‘/usr/lib/R/terra’## End Task Log #################################################################################################################
Error: Unhandled Exception: child_task=1523094421
child_task_status=failed: Error building image:
Error building terra (1.8-29). Build exited with non-zero status: 1
I'm not sure why it is trying to 'build' terra, since I have it installed and it works well. I don't think I have an oudated package or R version. See session info below
R version 4.3.2 (2023-10-31 ucrt)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 11 x64 (build 22631)
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] terra_1.8-29 rintrojs_0.3.4 sf_1.0-16 tidyr_1.3.1 dplyr_1.1.4 ggplot2_3.5.1 leaflet_2.2.2
[8] shinythemes_1.2.0 shiny_1.9.1
Share
Improve this question
asked Mar 22 at 5:09
BeardedantBeardedant
16012 bronze badges
5
|
1 Answer
Reset to default 0The solution was in updating my Rstudio version from 4.3.2 to 4.4.x
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744324586a4568583.html
leaflet
only suggeststerra
, it does not require it, its dependency should be based on how you are usingleaflet
. (3) Please include how and to where you are attempting to deploy your shiny app. – r2evans Commented Mar 22 at 5:27terra
which needs C++ compilation which fails on deploy, but succeeds locally. Maybe adding dependencies.txt helps or editing the App.R binaries. – Tim G Commented Mar 22 at 11:30account=
orserver=
(which is fine); the default action is to either prompt you for the remote account or to use the last-known server/account. While you don't necessarily need to give us the entire return values,rsconnect::servers()
andrsconnect::accounts()
might inform or remind you to what server you're deploying your app. Sinceshinyapps.io
says that it explicitly supports the libraries required byterra
, I suspect you're going somewhere else. – r2evans Commented Mar 22 at 15:46