devtools install problems in ubuntu
myrainbowandsky opened this issue · 2 comments
myrainbowandsky commented
Ubuntu 22.04
R version 4.3.3 (2024-02-29) -- "Angel Food Cake"
Copyright (C) 2024 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)
> if(!"devtools" %in% row.names(installed.packages())){
install.packages("devtools")
}
devtools::install_github("atomashevic/transforEmotion")
Installing package into ‘/home/lawrencexu/R/x86_64-pc-linux-gnu-library/4.3’
(as ‘lib’ is unspecified)
also installing the dependencies ‘systemfonts’, ‘textshaping’, ‘ragg’, ‘pkgdown’
trying URL 'https://cloud.r-project.org/src/contrib/systemfonts_1.1.0.tar.gz'
Content type 'application/x-gzip' length 85584 bytes (83 KB)
==================================================
downloaded 83 KB
trying URL 'https://cloud.r-project.org/src/contrib/textshaping_0.4.0.tar.gz'
Content type 'application/x-gzip' length 37960 bytes (37 KB)
==================================================
downloaded 37 KB
trying URL 'https://cloud.r-project.org/src/contrib/ragg_1.3.2.tar.gz'
Content type 'application/x-gzip' length 430366 bytes (420 KB)
==================================================
downloaded 420 KB
trying URL 'https://cloud.r-project.org/src/contrib/pkgdown_2.1.0.tar.gz'
Content type 'application/x-gzip' length 1261777 bytes (1.2 MB)
==================================================
downloaded 1.2 MB
trying URL 'https://cloud.r-project.org/src/contrib/devtools_2.4.5.tar.gz'
Content type 'application/x-gzip' length 374718 bytes (365 KB)
==================================================
downloaded 365 KB
* installing *source* package ‘systemfonts’ ...
** package ‘systemfonts’ successfully unpacked and MD5 sums checked
** using staged installation
Package fontconfig was not found in the pkg-config search path.
Perhaps you should add the directory containing `fontconfig.pc'
to the PKG_CONFIG_PATH environment variable
Package 'fontconfig', required by 'virtual:world', not found
Package 'freetype2', required by 'virtual:world', not found
Using PKG_CFLAGS=
Using PKG_LIBS=-lfontconfig -lfreetype
--------------------------- [ANTICONF] --------------------------------
Configuration failed to find the fontconfig freetype2 library. Try installing:
* deb: libfontconfig1-dev (Debian, Ubuntu, etc)
* rpm: fontconfig-devel (Fedora, EPEL)
* csw: fontconfig_dev (Solaris)
* brew: freetype (OSX)
If fontconfig freetype2 is already installed, check that 'pkg-config' is in your
PATH and PKG_CONFIG_PATH contains a fontconfig freetype2.pc file. If pkg-config
is unavailable you can set INCLUDE_DIR and LIB_DIR manually via:
R CMD INSTALL --configure-vars='INCLUDE_DIR=... LIB_DIR=...'
-------------------------- [ERROR MESSAGE] ---------------------------
<stdin>:1:10: fatal error: fontconfig/fontconfig.h: No such file or directory
compilation terminated.
--------------------------------------------------------------------
ERROR: configuration failed for package ‘systemfonts’
* removing ‘/home/lawrencexu/R/x86_64-pc-linux-gnu-library/4.3/systemfonts’
ERROR: dependency ‘systemfonts’ is not available for package ‘textshaping’
* removing ‘/home/lawrencexu/R/x86_64-pc-linux-gnu-library/4.3/textshaping’
ERROR: dependencies ‘systemfonts’, ‘textshaping’ are not available for package ‘ragg’
* removing ‘/home/lawrencexu/R/x86_64-pc-linux-gnu-library/4.3/ragg’
ERROR: dependency ‘ragg’ is not available for package ‘pkgdown’
* removing ‘/home/lawrencexu/R/x86_64-pc-linux-gnu-library/4.3/pkgdown’
ERROR: dependency ‘pkgdown’ is not available for package ‘devtools’
* removing ‘/home/lawrencexu/R/x86_64-pc-linux-gnu-library/4.3/devtools’
The downloaded source packages are in
‘/tmp/RtmpqtepED/downloaded_packages’
Warning messages:
1: In install.packages("devtools") :
installation of package ‘systemfonts’ had non-zero exit status
2: In install.packages("devtools") :
installation of package ‘textshaping’ had non-zero exit status
3: In install.packages("devtools") :
installation of package ‘ragg’ had non-zero exit status
4: In install.packages("devtools") :
installation of package ‘pkgdown’ had non-zero exit status
5: In install.packages("devtools") :
installation of package ‘devtools’ had non-zero exit status
Error in loadNamespace(x) : there is no package called ‘devtools’
atomashevic commented
Hi,
Thanks for reporting the issue.
It seems like you have problems with devtools
installation.
This part of the message is relevant for you:
--------------------------- [ANTICONF] --------------------------------
Configuration failed to find the fontconfig freetype2 library. Try installing:
* deb: libfontconfig1-dev (Debian, Ubuntu, etc)
You should install the missing library, just run
sudo apt -y install libfontconfig1-dev
in the system terminal and then try again installing everything in R.
Let me know if this helps.
myrainbowandsky commented
Thank you. it works.