I am facing error while installing R package textshaping - r

I am getting this error while installing packages.
ERROR: configuration failed for package ‘textshaping’
ERROR: configuration failed for package ‘textshaping’
removing ‘/home/Saniya/R/si-s/renv/staging/1/textshaping’
Error: install of package 'textshaping' failed [error code 1]
What is wrong and what should I do. I am new with R. Please help.

In bash:
sudo apt install libharfbuzz-dev libfribidi-dev
in RStudio
install.packages("textshaping", dependencies = TRUE)

Related

Installing devtools

I'm trying to install devtools for R in a MacBook (OS 13.0)
Problem is that it doesn't have dependency pkgdown:
ERROR: dependency ‘pkgdown’ is not available for package ‘devtools’
* removing ‘/opt/homebrew/lib/R/4.2/site-library/devtools’
nor ragg (when I try to install pkgdown)
<stdin>:1:10: fatal error: 'hb-ft.h' file not found
#include <hb-ft.h>
^~~~~~~~~
1 error generated.
--------------------------------------------------------------------
ERROR: configuration failed for package ‘textshaping’
ERROR: dependency ‘ragg’ is not available for package ‘pkgdown’
Trying to install textshaping didn't work either, giving:
#include <hb-ft.h>
^~~~~~~~~
1 error generated.
--------------------------------------------------------------------
ERROR: configuration failed for package ‘textshaping’
* removing ‘/opt/homebrew/lib/R/4.2/site-library/textshaping’
Never mind I solved it with:
brew install harfbuzz
brew install fribidi
In addition (for future reference) you also need:
brew install libgit2
and then
install.packages("usethis", verbose=TRUE)

How to solve "ERROR: compilation failed for package ‘later’" when installing shiny

I'm installing Shiny Server for R Language in CentOS 6.5 using:
install.packages('shiny', repos='https://cran.rstudio.com/')
And get:
ERROR: compilation failed for package ‘later’
* removing ‘/usr/lib64/R/library/later’
ERROR: dependency ‘later’ is not available for package ‘promises’
* removing ‘/usr/lib64/R/library/promises’
Looking in the Internet I found that I need devtools to install it from git hub:
https://github.com/r-lib/later/issues/78
Using:
install.packages('devtools', repos='https://cran.rstudio.com/')
But get the same error:
ERROR: dependency ‘later’ is not available for package ‘promises’
How to solve this in order to install shiny?
The problem was solved upgrading the C++ compiler in CentOS.
This guide was useful for the process:
https://edwards.sdsu.edu/research/c11-on-centos-6/

ERROR: compilation failed for package ‘xml2’

I am installing "rvest" and "xml2" packages in Ubuntu 16.04. But on multiple times i am getting the error as below
/usr/lib/R/etc/Makeconf:143: recipe for target 'connection.o' failed
make: *** [connection.o] Error 1
ERROR: compilation failed for package ‘xml2’
* removing ‘/home/prdmcl/R/x86_64-pc-linux-gnu-library/3.2/xml2’
Warning in install.packages :
installation of package ‘xml2’ had non-zero exit status
I checked multiple sources and did this also
sudo apt-get install libcurl4-openssl-dev libssl-dev
sudo apt-get install libxml2-dev
But failed to install.
Seems to be a specific problem with your system(mainly with C++), not with the package.
I had the same problem, and I used this workaround on R command line :
withr::with_makevars(c(CXX = "g++ -std=c++11"),install.packages("xml2", verbose = TRUE))
This will install xml2. After that, you can install rvest package

I am trying to install openssl package in R using Ubuntu 18.04 without success

I try to install the Openssl package in R (using RStudio in Ubuntu 18.04), but I get the error "undefined symbol: RSA_pkey_ctx_ctrl":
Error: package or namespace load failed for ‘openssl’ in dyn.load(file, DLLpath = DLLpath, ...):
unable to load shared object '/home/danilo/R/x86_64-pc-linux-gnu-library/3.4/openssl/libs/openssl.so':
/home/danilo/R/x86_64-pc-linux-gnu-library/3.4/openssl/libs/openssl.so: undefined symbol: RSA_pkey_ctx_ctrl
Error: loading failed
Execution halted
ERROR: loading failed
* removing ‘/home/danilo/R/x86_64-pc-linux-gnu-library/3.4/openssl’
Warning in install.packages :
installation of package ‘openssl’ had non-zero exit status.
I have already tried to install through both RStudio and Terminal, but as I am relatively new to Ubuntu, I did not have any success. I have the tar.gz file downloaded, but I don't know what should I do with it.
I actually want to use packages httr and ggmap, but they both require openssl.
Try in terminal:
sudo apt-get install libssl-dev
and after that try to install package openssl in R again.

dependencies ‘rJava’, ‘Rserve’ are not available for package ‘RHive’

ERROR: dependencies ‘rJava’, ‘Rserve’ are not available for package ‘RHive’
* removing ‘/root/R/x86_64-redhat-linux-gnu-library/3.2/RHive’
How do I fix this?
I am trying to run:
R CMD INSTALL RHive_2.0-0.10.tar.gz
Directly uploading RHive to
R/x86_64-redhat-linux-gnu-library/3.2
gives
Error in library(RHive) : ‘RHive’ is not a valid installed package
I could run Rserve only by using
/usr/lib64/R/bin/R CMD /home/rstudio/R/x86_64-redhat-linux-gnu-library/3.2/Rserve/libs//Rserve

Resources