r-lib / pak

A fresh approach to package installation
https://pak.r-lib.org
671 stars 60 forks source link

lp_etaPFI.h not found in pak installation #560

Closed hh1985 closed 10 months ago

hh1985 commented 10 months ago

I tried to install pak through install.packages("pak"), but got following error

lp_lib.c:65:12: fatal error: 'lp_etaPFI.h' file not found
  #include "lp_etaPFI.h"
           ^~~~~~~~~~~~~
1 error generated.
make[1]: *** [/usr/lib/R/etc/Makeconf:191: lp_lib.o] Error 1
make[1]: Leaving directory '/tmp/RtmpmZDbPz/R.INSTALL1bde3230e38c77/pak/src/library/lpSolve/src'
ERROR: compilation failed for package ‘lpSolve’

I manually installed lpSolve, but the error remained.

gaborcsardi commented 10 months ago

The simplest is to install a binary package from our repo, see https://pak.r-lib.org/#arrow_down-installation

Or, if CRAN builds binaries for your platform, you can install those. They are potentially not the latest pak versions.

If you insist on building pak from source, then you'll need to tell us more about your setup, e.g. what you have in your ~/.R/Makevars file, what's your platform, and also show the full compilation output.

hh1985 commented 10 months ago

I successfully installed the binary package. No need to deal with the source version.