Local app runs fine, but I keep encountering this error when attempting to publish it.
I have already installed fribidi
& harfbuzz
using brew install fribidi
& brew install harfbuzz
on my Mac, but I am still encountering the error.
I am using:
RStudio
:2023.12.0+369
Installing urltools (1.7.3) ...
Using cached urltools.
OK (symlinked cache)
Installing textshaping (0.3.7) ...
curl: HTTP 200 https://cran.rstudio.com/src/contrib/PACKAGES.rds
curl: HTTP 200 https://cran.rstudio.com/src/contrib/textshaping_0.3.7.tar.gz
[1] "Command failed (1)\n\nFailed to run system command:\n\n\t'/opt/R/4.2.3/lib/R/bin/R' --vanilla CMD INSTALL --preclean '/opt/rstudio-connect/mnt/tmp/Rtmpail76h/packrat-install-32ca7ea6ecc9/textshaping' --library='/opt/rstudio-connect/mnt/app/packrat/lib/x86_64-pc-linux-gnu/4.2.3' --install-tests --no-docs --no-multiarch --no-demo \n\nThe command failed with output:\n* installing *source* package ‘textshaping’ ...\n** package ‘textshaping’ successfully unpacked and MD5 sums checked\n** using staged installation\nPackage harfbuzz was not found in the pkg-config search path.\nPerhaps you should add the directory containing `harfbuzz.pc'\nto the PKG_CONFIG_PATH environment variable\nNo package 'harfbuzz' found\nPackage fribidi was not found in the pkg-config search path.\nPerhaps you should add the directory containing `fribidi.pc'\nto the PKG_CONFIG_PATH environment variable\nNo package 'fribidi' found\nUsing PKG_CFLAGS=\nUsing PKG_LIBS=-lfreetype -lharfbuzz -lfribidi -lp
ng\n--------------------------- [ANTICONF] --------------------------------\nConfiguration failed to find the harfbuzz freetype2 fribidi library. Try installing:\n * deb: libharfbuzz-dev libfribidi-dev (Debian, Ubuntu, etc)\n * rpm: harfbuzz-devel fribidi-devel (Fedora, EPEL)\n * csw: libharfbuzz_dev libfribidi_dev (Solaris)\n * brew: harfbuzz fribidi (OSX)\nIf harfbuzz freetype2 fribidi is already installed, check that 'pkg-config' is in your\nPATH and PKG_CONFIG_PATH contains a harfbuzz freetype2 fribidi.pc file. If pkg-config\nis unavailable you can set INCLUDE_DIR and LIB_DIR manually via:\nR CMD INSTALL --configure-vars='INCLUDE_DIR=... LIB_DIR=...'\n-------------------------- [ERROR MESSAGE] ---------------------------\n<stdin>:1:19: fatal error: hb-ft.h: No such file or directory\ncompilation terminated.\n--------------------------------------------------------------------\nERROR: configuration failed for package ‘textshaping’\n* removing ‘/opt/rstudio-connect/mnt/app/packrat/lib/x86_64-pc-linux-
gnu/4.2.3/textshaping’"
Error: Command failed (1)
Failed to run system command:
'/opt/R/4.2.3/lib/R/bin/R' --vanilla CMD INSTALL --preclean '/opt/rstudio-connect/mnt/tmp/Rtmpail76h/packrat-install-32ca7ea6ecc9/textshaping' --library='/opt/rstudio-connect/mnt/app/packrat/lib/x86_64-pc-linux-gnu/4.2.3' --install-tests --no-docs --no-multiarch --no-demo
The command failed with output:
* 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:19: fatal error: hb-ft.h: No such file or directory
compilation terminated.
--------------------------------------------------------------------
ERROR: configuration failed for package ‘textshaping’
* removing ‘/opt/rstudio-connect/mnt/app/packrat/lib/x86_64-pc-linux-gnu/4.2.3/textshaping’
Unable to fully restore the R packages associated with this deployment.
Please review the preceding messages to determine which package
encountered installation difficulty and the cause of the failure.
Warning message:
In packrat::restore(overwrite.dirty = TRUE, prompt = FALSE, restart = FALSE) :
The most recent snapshot was generated using R version 4.3.2
Error code: r-missing-system-library
An R package cannot be installed because a required system-level dependency is missing.
Possible causes:
* An R package requires a system-level dependency, such as a library or executable, which is not installed on the Connect server.
Possible solutions:
* Install the required package using your system package manager (such as apt or yum).
* If you have RStudio Package Manager, open the information page for the affected R package. Installation instructions for the package's system-level dependencies are included under the Install System Prerequisites heading
* Otherwise, use the messages in the deployment log to identify which system package you need to install.
References:
* https://docs.rstudio.com/connect/admin/getting-started/#redhat-package-dependencies
* https://docs.rstudio.com/connect/admin/getting-started/#suse-package-dependencies
* https://docs.rstudio.com/connect/admin/getting-started/#ubuntu-package-dependencies
Additional data:
PackageVersion: '0.3.7'
SystemPackage: 'harfbuzz' found\nPackage fribidi was not found in the pkg-config search path.\nPerhaps you should add the directory containing `fribidi.pc'\nto the PKG_CONFIG_PATH environment variable\nNo package 'fribidi'
Package: 'textshaping'
Found in the following log entry:
[1] "Command failed (1)\n\nFailed to run system command:\n\n\t'/opt/R/4.2.3/lib/R/bin/R' --vanilla CMD INSTALL --preclean '/opt/rstudio-connect/mnt/tmp/Rtmpail76h/packrat-install-32ca7ea6ecc9/textshaping' --library='/opt/rstudio-connect/mnt/app/packrat/lib/x86_64-pc-linux-gnu/4.2.3' --install-tests --no-docs --no-multiarch --no-demo \n\nThe command failed with output:\n* installing *source* package ‘textshaping’ ...\n** package ‘textshaping’ successfully unpacked and MD5 sums checked\n** using staged installation\nPackage harfbuzz was not found in the pkg-config search path.\nPerhaps you should add the directory containing `harfbuzz.pc'\nto the PKG_CONFIG_PATH environment variable\nNo package 'harfbuzz' found\nPackage fribidi was not found in the pkg-config search path.\nPerhaps you should add the directory containing `fribidi.pc'\nto the PKG_CONFIG_PATH environment variable\nNo package 'fribidi' found\nUsing PKG_CFLAGS=\nUsing PKG_LIBS=-lfreetype -lharfbuzz -lfribidi -lp
Build error: An R package cannot be installed because a required system-level dependency is missing. (r-missing-system-library)
── Deployment complete ─────────────────────────────────────────────────────────
✖ Deployment failed with error: An R package cannot be installed because a required system-level dependency is missing. (r-missing-system-library)