Deployment Error of shiny app on shiny server - r

I'm trying to deploy a shiny app on shiny server, I get this error, Any idea about this error?
Building with AppArmor (Linux)
Using PKG_CFLAGS=
Using PKG_LIBS=-lapparmor
On Debian/Ubuntu this package requires AppArmor.
Please run: sudo apt-get install libapparmor-dev
To build without AppArmor support, set NO_APPARMOR=1 for example:
install.packages('sys', configure.vars = 'NO_APPARMOR=1')
ERROR: configuration failed for package �sys�
* removing �/usr/local/lib/R/site-library/sys�
################################# End Task Log #################################
Error: Unhandled Exception: Child Task 428423284 failed: Error building image: Error building sys (1.3). Build exited with non-zero status: 1
Execution halted

Related

Failed to create bus connection; running command 'timedatectl' had status 1

I'm using WSL2.
In R, I tried to install packages. For example:
> install.packages("tidyverse")
But I'm getting a Failed to create bus connection error.
Traceback:
Failed to create bus connection: No such file or directory
Warning in system("timedatectl", intern = TRUE) :
running command 'timedatectl' had status 1
** help
*** installing help indices
*** copying figures
** building package indices
** installing vignettes
** testing if installed package can be loaded from temporary location
Failed to create bus connection: No such file or directory
Warning in system("timedatectl", intern = TRUE) :
running command 'timedatectl' had status 1
** testing if installed package can be loaded from final location
Failed to create bus connection: No such file or directory
Warning in system("timedatectl", intern = TRUE) :
running command 'timedatectl' had status 1
** testing if installed package keeps a record of temporary installation path
* DONE (tidyverse)
The downloaded source packages are in
‘/tmp/RtmpD1g9KP/downloaded_packages’
I've tried to install the dbus package:
sudo apt-get update
sudo apt-get install dbus
And am still getting the error after reboot.
I also tried:
sudo systemctl status
but it returns:
System has not been booted with systemd as init system (PID 1). Can't operate.
In .bashrc, or in some other alias file, add a variable for TZ. For me, I did
export TZ="America/New_York"
Then reload bash and it should recognize the timezone. You can see more about the timezone names here: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones

Deploy Rshiny App :Error Building Hunspell(2.7)

The code works properly in the RStudio IDE but when deploying the RShiny app it generates this error
Error: Unhandled Exception: Child Task 499025532 failed: Error building image: Error building hunspell (2.7). Build exited with non-zero status: 1
I am a newbie and my App works on sentiment analysis based on text2vec package and also generates wordcloud.
Is there any way to overcome this?
Package dependencies for the app are:
> package version source
1 packrat 0.4.8-1 CRAN
Thanks in advance

Error deploying shinyapp fatal error: plogr.h: No such file or directory

I'm trying to deploy a Shiny app. When the app is running in RStudio I select the deploy button to republish my updated app.
After a minute or so I receive the following error block in the console:
/usr/local/lib/R/site-library/dplyr/include/dplyr/main.h:11:19: fatal error: plogr.h: No such file or directory
#include <plogr.h>
^
compilation terminated.
In file included from /usr/local/lib/R/site-library/dplyr/include/dplyr.h:4:0,
from rows-data.cpp:2:
/usr/local/lib/R/site-library/dplyr/include/dplyr/main.h:11:19: fatal error: plogr.h: No such file or directory
#include <plogr.h>
^
compilation terminated.
make: *** [rows.o] Error 1
make: *** Waiting for unfinished jobs....
make: *** [rows-data.o] Error 1
ERROR: compilation failed for package ‘purrr’
* removing ‘/usr/local/lib/R/site-library/purrr’
################################# End Task Log #################################
Error: Unhandled Exception: Child Task 492377328 failed: Error building image: Error building purrr (0.2.2). Build exited with non-zero status: 1
Execution halted
I found this discussion on Google groups. Reading through this discussion I tried to reinstall dplyr with dependencies = T.
Here are the libraries I try to load with my app:
library(tidyverse)
library(shiny)
library(shinydashboard)
library(shinyjs)
library(lubridate)
library(DT)
library(scales)
I also tried to install plogr directly:
> install.packages("plogr.h")
Warning in install.packages :
package ‘plogr.h’ is not available (for R version 3.3.3)
Does anyone have any advice for deploying my Shinyapp based on this info? What should I do to get around this error?
#Doug Fir I also struggled with this but finally got this working.
1) I first also tried with no luck to
install.packages("dplyr", dependencies = TRUE)
2) So I then took a good look at the error messages on Deploy tab in Rstudio and noticed that it was complaining about another package or two. In this case purrr and Rcpp. So I reinstalled these two as well.
so I:
install.packages(c("Rcpp","purrr"))
3) I noticed Shiny was not up to date (1.0.1 not 1.0.5) so I updated that for good measure.
install.packages("shiny")
4) then quit Rstudio and restarted R.
Shiny app with dplyr then finally redeployed. Not sure if this beats your answer, but at least dplyr 0.7.4 worked without needing to downgrade.
I am posting this to provide clues if someone else has this problem.
I downloaded an earlier version of DPLYR (0.5.0 no reason, just randomly chose that version) from here. Doing this seemed to fix everything, I don't know why.

Building error with IJulia

I used to use Julia in Jupyter notebook. I uninstalled yesterday the .julia directory because of other issues and after Pkg.add(IJulia) Im getting a building error related to ZMQ. the full error is below.
julia> Pkg.build("ZMQ")
INFO: Building Homebrew
Already up-to-date.
INFO: Building ZMQ
Warning: staticfloat/juliatranslated/zeromq32-3.2.5 already installed, it's just not linked.
Error: Formulae found in multiple taps:
* staticfloat/juliadeps/zeromq32
* staticfloat/juliatranslated/zeromq32
Please use the fully-qualified name e.g. staticfloat/juliadeps/zeromq32 to refer the formula.
=================================[ ERROR: ZMQ ]=================================
LoadError: failed process: Process(`/Users/pacagal/.julia/v0.5/Homebrew/deps/usr/bin/brew link staticfloat/juliatranslated/zeromq32 --force`, ProcessExited(1)) [1]
while loading /Users/pacagal/.julia/v0.5/ZMQ/deps/build.jl, in expression starting on line 35
================================================================================
================================[ BUILD ERRORS ]================================
WARNING: ZMQ had build errors.
- packages with build errors remain installed in /Users/pacagal/.julia/v0.5
- build the package(s) and all dependencies with `Pkg.build("ZMQ")`
- build a single package by running its `deps/build.jl` script
================================================================================
I have also run the build.jl file but I am getting an error too.
I was having the same issue this morning. In the terminal I ran brew install zmq and that resolved the issue.
I still had to run julia>Pkg.build("Nettle") after installing zmq and after that IJulia is running fine.

Troubles with shiny markdown and Rmpfr (0.5-7) package

I am using RStudio on a windows machine. recently, I wanted to deploy an shiny-markdown document using the HH library - wihout sucess. I broke down the error to the following test program
---
title: "Untitled"
runtime: shiny
output: html_document
---
```{r}
require( Rmpfr )
```
This program works well if I run it locally. However, if I try to deploy it to shinyapps.io using shinyapps::deployApp(), RStudio tries to build the package Rmpfr from source even tough the package is already installed. This building from source fails with the following error (full error log: http://pastebin.com/D5KVc44n)
configure: error: Header file mpfr.h not found; maybe use --with-mpfr-include=INCLUDE_PATH
ERROR: configuration failed for package ‘Rmpfr’
* removing ‘/usr/local/lib/R/site-library/Rmpfr’
################################# End Task Log #################################
Error: Unhandled Exception: Child Task 61322212 failed: Error building image: Error building Rmpfr (0.5-7). Build exited with non-zero status: 1
I think this question is related to this one about the rmpfr package, but the solution does not work on windows since it uses the apt-get command.
Any suggestions are welcome.
EDIT: I already tried to make mpfr.h available. I downloaded the mpfr package from http://www.mpfr.org/mpfr-current/, unpacked it and added it to the windows PATH variable. I also copied the entries of the mpfr-3.0.0 folder to the R working directory. Both methods showed no success.

Resources