Hi, everyone,
I'm so sad about this, my r encounters those error for serveal months, i try to reinstall my system , reinstall my r , r studio, research all solutions in google, but they don't work. Now i want to ask for help , please. Exactly, i am crazy about this, i feel so dispointed. Please, please help me.
sincerely
douglas
report_output.pdf (21.6 KB)
For the record, this is the error:
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 โtextshapingโ ...
** package โtextshapingโ successfully unpacked and MD5 sums checked
** using staged installation
Package harfbuzz was not found in the pkg-config search path.
Perhaps you should add the directory containing `harfbuzz.pc'
to the PKG_CONFIG_PATH environment variable
No package 'harfbuzz' found
Package fribidi was not found in the pkg-config search path.
Perhaps you should add the directory containing `fribidi.pc'
to the PKG_CONFIG_PATH environment variable
No package 'fribidi' found
Using PKG_CFLAGS=
Using PKG_LIBS=-lfreetype -lharfbuzz -lfribidi -lpng
--------------------------- [ANTICONF] --------------------------------
Configuration failed to find the harfbuzz freetype2 fribidi library. Try installing:
* deb: libharfbuzz-dev libfribidi-dev (Debian, Ubuntu, etc)
* rpm: harfbuzz-devel fribidi-devel (Fedora, EPEL)
* csw: libharfbuzz_dev libfribidi_dev (Solaris)
* brew: harfbuzz fribidi (OSX)
If harfbuzz freetype2 fribidi is already installed, check that 'pkg-config' is in your
PATH and PKG_CONFIG_PATH contains a harfbuzz freetype2 fribidi.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: hb-ft.h: No such file or directory
compilation terminated.
--------------------------------------------------------------------
ERROR: configuration failed for package โtextshapingโ
Which means that you don't have the required system packages installed to install some of these R packages.
Which Linux distribution do you use?
i use it in ubuntu 22.04 LTS, those packages that need to be installed were work in r as "had non-zero exit status" .
Some R packages need system software, e.g. the fribidi R package needs the libharfbuzz-dev
and libfribidi-dev
Ubuntu packages installed on your system.
You can also try to use the pak R package to install R packages, and if it will print or install the system packages for you. E.g.
stream <- "rc"
install.packages("pak", repos = sprintf(
"https://r-lib.github.io/p/pak/%s/%s/%s/%s",
stream,
.Platform$pkgType,
R.Version()$os,
R.Version()$arch
))
and then
pak::pkg_install("tidyverse")
Cf. All about installing pak. โ Installing pak โข pak
pak can also help you check which Ubuntu packages you need:
โฏ pak::pkg_sysreqs("tidyverse", sysreqs_platform="ubuntu-22.04")
โโ Install scripts โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ Ubuntu 22.04 โโ
apt-get -y update
apt-get -y install libcurl4-openssl-dev libssl-dev zlib1g-dev make pandoc \
libfreetype6-dev libjpeg-dev libpng-dev libtiff-dev libicu-dev \
libfontconfig1-dev libfribidi-dev libharfbuzz-dev libxml2-dev
โโ Packages and their system dependencies โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
curl โ libcurl4-openssl-dev, libssl-dev
data.table โ zlib1g-dev
fs โ make
haven โ make, zlib1g-dev
knitr โ pandoc
openssl โ libssl-dev
ragg โ libfreetype6-dev, libjpeg-dev, libpng-dev, libtiff-dev
reprex โ pandoc
rmarkdown โ pandoc
sass โ make
stringi โ libicu-dev
systemfonts โ libfontconfig1-dev, libfreetype6-dev
textshaping โ libfreetype6-dev, libfribidi-dev, libharfbuzz-dev
xml2 โ libxml2-dev
If you are using an x86_64 system, then you can also set up Posit Package Manager and then R will use binary packages that are much faster to install.
so i tried to use binary packages , that was work . Luckily, i input "sudo apt-get install libharfbuzz-dev libfribidi-dev" according to the ANTICONF tips, nice, it works. But I still want to thank u , your reply give me spirit. Thank you , sir.
sincerely,
Douglas
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.
If you have a query related to it or one of the replies, start a new topic and refer back with a link.