install error
Closed this issue Β· 4 comments
I am facing the below error when installing ragg:
β Will download 1 package with unknown size.
- ragg 1.2.2 β 1.2.6.9000 π·π½ββοΈπ§ β¬ (GitHub: 9cb92fd)
? Do you want to continue (Y/n) y
βΉ Getting 1 pkg with unknown size
β Got ragg 1.2.6.9000 (source) (734.17 kB)
β Downloaded 1 package (734.17 kB)in 5.1s
βΉ Packaging ragg 1.2.6.9000
β Packaged ragg 1.2.6.9000 (2.5s)
βΉ Building ragg 1.2.6.9000
β Failed to build ragg 1.2.6.9000
Error:
! error in pak subprocess
Caused by error instop_task_build(state, worker)
:
! Failed to build source package 'ragg'
Type .Last.error to see the more details.
Any hint?
ragg has just been updated but binaries has not yet been build. So pak is trying to install the source version which requires a number of system libraries that I guess is not available on your system. Either force binaries during install (will currently not install the latest version, wait a few days for cran to serve the newest binaries, or install the required system libraries as given in the DESCRIPTION file
Evening
It seems I have the same issue:
using command: Rscript -e 'withr::with_libpaths(new = "/opt/conda/envs/env_name/lib/R/library", pak::pak("r-lib/ragg@v1.2.0"))'
or versions v1.2.5
, v1.2.6
or not specifying one I get:
Using bundled GitHub PAT. Please add your own PAT using gitcreds::gitcreds_set()
.
β Updated metadata database: 2.81 MB in 8 files.
β Updating metadata database ... done
β Will update 1 package.
β Will download 1 package with unknown size.
- ragg 1.2.5 β 1.2.0 [bld][cmp][dl] (GitHub: abbd24c) + β libfreetype6-dev, β libjpeg-dev, β libpng-dev, β libtiff-dev
β All system requirements are already installed.
βΉ Getting 1 pkg with unknown size
β Got ragg 1.2.0 (source) (2.41 MB)
βΉ Packaging ragg 1.2.0
β Packaged ragg 1.2.0 (5s)
βΉ Building ragg 1.2.0
β Failed to build ragg 1.2.0
Error:
! error in pak subprocess
Caused by error in stop_task_build(state, worker)
:
! Failed to build source package 'ragg'
Full installation output:
- installing source package βraggβ ...
staged installation is only possible with locking
** using non-staged installation
Found pkg-config cflags and libs!
Using PKG_CFLAGS=-I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/x86_64-linux-gnu
Using PKG_LIBS=-lfreetype -lpng16 -lm -lz -lm -lz -ltiff -lwebp -lzstd -llzma -ljbig -ljpeg -lz -lm
-----------------------------[ ANTICONF ]-------------------------------
Configuration failed to find one of freetype2 libpng libtiff-4. Try installing: - deb: libfreetype6-dev libpng-dev libtiff5-dev libjpeg-dev (Debian, Ubuntu, etc)
- rpm: freetype-devel libpng-devel libtiff-devel libjpeg-turbo-devel (Fedora, CentOS, RHEL)
- csw: libfreetype_dev libpng16_dev libtiff_dev libjpeg_dev (Solaris)
If freetype2 libpng libtiff-4 is already installed, check that 'pkg-config' is in your
PATH and PKG_CONFIG_PATH contains a freetype2 libpng libtiff-4.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] ---------------------------
In file included from /opt/conda/envs//x86_64-conda-linux-gnu/sysroot/usr/include/features.h:361,
from /opt/conda/envs/env_name/x86_64-conda-linux-gnu/sysroot/usr/include/limits.h:27,
from /opt/conda/envs/env_name/lib/gcc/x86_64-conda-linux-gnu/13.2.0/include/limits.h:205,
from /opt/conda/envs/env_name/lib/gcc/x86_64-conda-linux-gnu/13.2.0/include/syslimits.h:7,
from /opt/conda/envs/env_name/lib/gcc/x86_64-conda-linux-gnu/13.2.0/include/limits.h:34,
from /usr/include/libpng16/pngconf.h:31,
from /usr/include/libpng16/png.h:339,
from :2:
/usr/include/x86_64-linux-gnu/sys/cdefs.h:482:49: error: missing binary operator before token "("
482 | #if __GNUC_PREREQ (4,8) || __glibc_clang_prereq (3,5)
| ^
In file included from /opt/conda/envs/env_name/x86_64-conda-linux-gnu/sysroot/usr/include/stdio.h:932,
from /usr/include/libpng16/pngconf.h:46:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:228:17: error: missing binary operator before token "("
228 | #if __GLIBC_USE (DEPRECATED_GETS)
| ^
ERROR: configuration failed for package βraggβ
- removing β/tmp/Rtmp0WKHaK/pkg-lib4b11528370/raggβ
Backtrace:
- withr::with_libpaths(new = "/opt/conda/envs/etl_qa_characterise_omop/lib/R/library", β¦
- base::force(code)
- pak::pak("r-lib/ragg@v1.2.0")
- pak::pkg_install(pkg, ...)
- pak:::remote(function(...) get("pkg_install_do_plan", asNamespace("pak"))(...), β¦
- err$throw(res$error)
Subprocess backtrace:
- base::withCallingHandlers(cli_message = function(msg) { β¦
- get("pkg_install_do_plan", asNamespace("pak"))(...)
- proposal$install()
- pkgdepends::install_package_plan(plan, lib = private$library, num_workers = nw, β¦
- base::withCallingHandlers({ β¦
- pkgdepends:::handle_events(state, events)
- pkgdepends:::handle_event(state, i)
- pkgdepends:::stop_task(state, worker)
- pkgdepends:::stop_task_build(state, worker)
- base::throw(new_pkg_build_error("Failed to build source package {pkg}", β¦
- | base::signalCondition(cond)
- global (function (e) β¦
Execution halted
Any ideas?
I do not know how conda works but it seems that people in general install conda specific packages when they want to use it. In any regards this is a conda issue not a ragg issue
Did you try installing the libraries it recommended in the error message? What OS are you on?