Comments (4)
I can.
> R.version.string
[1] "R version 4.4.1 (2024-06-14)"
> install.packages("devtools")
Installing package into '/Users/jenny/Library/R/arm64/4.4/library'
(as 'lib' is unspecified)
trying URL '[https://p3m.dev/cran/latest/bin/macosx/big-sur-arm64/contrib/4.4/devtools_2.4.5.tgz](vscode-file://vscode-app/Users/jenny/rrr/positron/out/vs/code/electron-sandbox/workbench/workbench-dev.html#)'
Content type 'binary/octet-stream' length 437353 bytes (427 KB)
=====================================
downloaded 427 KB
The downloaded binary packages are in
/tmp/RtmpMGyMdU/downloaded_packages
> library(devtools)
So you're going to need to provide more detail.
from devtools.
here is the error
x86_64-conda-linux-gnu-ar rcs agg/libstatagg.a agg/src/agg_curves.o agg/src/agg_font_freetype.o agg/src/agg_image_filters.o agg/src/agg_trans_affine.o agg/src/agg_vcgen_dash.o agg/src/agg_vcgen_stroke.o
x86_64-conda-linux-gnu-c++ -std=gnu++17 -shared -L/anaconda3/envs/R4.4/lib/R/lib -Wl,-O2 -Wl,--sort-common -Wl,--as-needed -Wl,-z,relro -Wl,-z,now -Wl,--disable-new-dtags -Wl,--gc-sections -Wl,--allow-shlib-undefined -Wl,-rpath,/anaconda3/envs/R4.4/lib -Wl,-rpath-link,/anaconda3/envs/R4.4/lib -L/anaconda3/envs/R4.4/lib -o ragg.so capture_dev.o init.o jpeg_dev.o png_dev.o ppm_dev.o tiff_dev.o -Lagg -lstatagg -lfreetype -lpng15 -ltiff -ljpeg -L/anaconda3/envs/R4.4/lib/R/lib -lR
/anaconda3/envs/R4.4/bin/../lib/gcc/x86_64-conda-linux-gnu/14.1.0/../../../../x86_64-conda-linux-gnu/bin/ld: cannot find -lpng15: No such file or directory
collect2: error: ld returned 1 exit status
make: *** [/anaconda3/envs/R4.4/lib/R/share/make/shlib.mk:10: ragg.so] Error 1
ERROR: compilation failed for package ‘ragg’
- removing ‘/anaconda3/envs/R4.4/lib/R/library/ragg’
ERROR: dependency ‘gert’ is not available for package ‘usethis’ - removing ‘/anaconda3/envs/R4.4/lib/R/library/usethis’
ERROR: dependency ‘ragg’ is not available for package ‘pkgdown’ - removing ‘/anaconda3/envs/R4.4/lib/R/library/pkgdown’
ERROR: dependencies ‘usethis’, ‘pkgdown’ are not available for package ‘devtools’ - removing ‘/anaconda3/envs/R4.4/lib/R/library/devtools’
The downloaded source packages are in
‘/tmp/RtmpKj1bWN/downloaded_packages’
Updating HTML index of packages in '.Library'
Making 'packages.html' ... done
Warning messages:
1: In install.packages("devtools") :
installation of package ‘gert’ had non-zero exit status
2: In install.packages("devtools") :
installation of package ‘ragg’ had non-zero exit status
3: In install.packages("devtools") :
installation of package ‘usethis’ 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
thanks.
from devtools.
If you use conda, you need to install all of your packages from conda because they use a different toolchain than CRAN (the official distribution of R and contributed packages).
/anaconda3/envs/R4.4/bin/../lib/gcc/x86_64-conda-linux-gnu/14.1.0/../../../../x86_64-conda-linux-gnu/bin/ld: cannot find -lpng15: No such file or directory
Does your system have the PNG15 library available?
Overall, it sounds like you're (unintentionally?) trying to mix a conda-managed R installation with also installing packages from CRAN / from source, which generally does not go well.
from devtools.
In R version 4.4.1 (2024-06-14, x86_64-pc-linux-gnu) I had errors during usage and re-install of devtools
:
install.packages("devtools")
Installing package into ‘/usr/local/lib/R/site-library’
(as ‘lib’ is unspecified)
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 ‘devtools’ ...
** package ‘devtools’ successfully unpacked and MD5 sums checked
** using staged installation
** R
** inst
** byte-compile and prepare package for lazy loading
Error: .onLoad failed in loadNamespace() for 'pkgload', details:
call: .make_numeric_version(x, strict, .standard_regexps()$valid_numeric_version)
error: invalid non-character version specification 'x' (type: double)
Execution halted
ERROR: lazy loading failed for package ‘devtools’
* removing ‘/usr/local/lib/R/site-library/devtools’
Warning in install.packages :
installation of package ‘devtools’ had non-zero exit status
The downloaded source packages are in
‘/tmp/RtmpbYWTeU/downloaded_packages’
I 've launched pak::pak("devtools")
, like @hadley said there in #2566, and after after I've read errors:
sudo apt-get install libcurl4-openssl-dev libgit2-dev
install.packages("pkgload")
, reinstall, because of.onLoad failed in loadNamespace() for 'pkgload'
below.
And install.packages("devtools")
and the usage of devtools
work now with R version 4.4.1 :)
Found when I am trying to play with rextendr::document()
, from https://cran.r-project.org/web/packages/rextendr/vignettes/package.html, which gave me the same error at the line devtools::r_env_vars()
inside rextendr::document()
.
I have Anaconda but I use normal CRAN installation for R.
My post is only to give some others symptoms and tries because for me also "it sounds like you're (unintentionally?) trying to mix a conda-managed R installation with also installing packages from CRAN / from source, which generally does not go well."
from devtools.
Related Issues (20)
- `release` causes me a problem if 'foghorn' package is installed HOT 1
- Using system.file in a tryCatch environment HOT 2
- Export is not working when using typed library HOT 3
- Solution to the "checking examples ... ERROR" HOT 1
- [feature request] a new `exclude` argument into `run_examples()` HOT 2
- Clearly list system dependencies in documentation HOT 1
- `load_all()` documentation refers to `is_loading()`
- devtools::check(error_on="warning") doesn't error on warnings from documenting HOT 4
- `run_examples()` fails if `tests/testthat/helper.R` contains an un-exported function
- Update README reg R Packages second edition
- .
- Can't install the package HOT 2
- do not ask about `check_rhub()` in `release()` because it is deprecated and defunct HOT 1
- Deprecate `install_*`
- Import pak
- Use `httr` conditionally
- Harmonise devtools with testthat and cmdcheck HOT 2
- Change `quiet` default for `build_site()` HOT 2
- Option to build/check package from the git tree HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from devtools.