Giter Site home page Giter Site logo

Comments (4)

jennybc avatar jennybc commented on September 2, 2024

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.

BenxiaHu avatar BenxiaHu commented on September 2, 2024

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.

jennybc avatar jennybc commented on September 2, 2024

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.

philibe avatar philibe commented on September 2, 2024

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’
(aslibis 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* packagedevtools...
** packagedevtoolssuccessfully 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 packagedevtools* removing/usr/local/lib/R/site-library/devtoolsWarning in install.packages :
  installation of packagedevtoolshad 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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.