[R-pkg-devel] Rglpk on Linux
Dirk Eddelbuettel
edd @end|ng |rom deb|@n@org
Fri Nov 27 15:12:23 CET 2020
On 27 November 2020 at 12:05, Benjamin Becker wrote:
| I want to add 'Rglpk' as a dependency to a package. On windows and MacOS
| everything works fine, but there seem to be installation issues with the
| underlying optimization software 'GLPK' on Linux systems. The problem
| occurs when testing on Rhub and on Travis (I don't have a local Linux
| machine available):
|
| https://builder.r-hub.io/status/eatATA_0.9.0.tar.gz-bbf79f5120bc435d89eb4ea3f5b62918
|
| https://travis-ci.org/github/beckerbenj/eatATA/jobs/743971533
|
| with the error message:
|
| * installing *source* package ‘Rglpk’ ...
|
| ** package ‘Rglpk’ successfully unpacked and MD5 sums checked
|
| ** using staged installation
|
| ** libs
|
| /bin/bash: line 0: cd: GLPK: No such file or directory
|
| Makevars:10: recipe for target 'GLPK.ts' failed
|
| make: *** [GLPK.ts] Error 1
|
| ERROR: compilation failed for package ‘Rglpk’
| I am aware that there are other/similar reports of Rglpk installation
| problems on Linux (e.g.
| https://stackoverflow.com/questions/25114771/glpk-no-such-file-or-directory-error-when-trying-to-install-r-package)
| But other reverse dependencies of Rglpk on CRAN do not appear to have
| these issues (e.g. mknapsack, MSCMT, npbr ...)? Thanks, Benjamin
Make sure you have Ubuntu package
libglpk-dev
installed (which can typically control at your CI level though not at
RHub). It will pull the runtime package libglpk40 in.
Or, better still, enable the Rutter PPAs, or the RSPM, for your CI runs
because then you can just install Rglpk premade.
I like bspm for this; below you can see the full command log just running
'install.packages("Rglpk")' on a bspm-enabled system backed by the PPA (and I
have written some more at my blog about all this, follow the URL below to
blog and scroll, or google-search). It also install package slam premade and
whatever is needed. (It's Docker demo, so once the install concludes it ends
the demo.)
Hth, Dirk
edd using rob:~$ docker run --rm -ti rocker/r-bspm:20.04 Rscript -e 'install.packages("Rglpk")'
Loading required package: utils
Tracing function "install.packages" in package "utils"
Install system packages as root...
Reading package lists... Done
Building dependency tree
Reading state information... Done
Get:1 http://ppa.launchpad.net/c2d4u.team/c2d4u4.0+/ubuntu focal InRelease [18.1 kB]
Get:2 http://security.ubuntu.com/ubuntu focal-security InRelease [109 kB]
Hit http://archive.ubuntu.com/ubuntu focal InRelease
Get:3 http://archive.ubuntu.com/ubuntu focal-updates InRelease [114 kB]
Hit http://ppa.launchpad.net/edd/r-4.0/ubuntu focal InRelease
Get:4 http://archive.ubuntu.com/ubuntu focal-backports InRelease [101 kB]
Hit http://ppa.launchpad.net/marutter/rrutter4.0/ubuntu focal InRelease
Get:5 http://security.ubuntu.com/ubuntu focal-security/universe amd64 Packages [643 kB]
Get:6 http://archive.ubuntu.com/ubuntu focal-updates/multiverse amd64 Packages [30.4 kB]
Get:7 http://archive.ubuntu.com/ubuntu focal-updates/restricted amd64 Packages [126 kB]
Get:8 http://security.ubuntu.com/ubuntu focal-security/main amd64 Packages [466 kB]
Get:9 http://archive.ubuntu.com/ubuntu focal-updates/universe amd64 Packages [871 kB]
Get:10 http://ppa.launchpad.net/c2d4u.team/c2d4u4.0+/ubuntu focal/main Sources [1745 kB]
Get:11 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 Packages [850 kB]
Get:12 http://archive.ubuntu.com/ubuntu focal-backports/universe amd64 Packages [4248 B]
Get:13 http://ppa.launchpad.net/c2d4u.team/c2d4u4.0+/ubuntu focal/main amd64 Packages [837 kB]
Fetched 5913 kB in 0s (0 B/s)
Reading package lists... Done
Building dependency tree
Reading state information... Done
Get:1 http://archive.ubuntu.com/ubuntu focal/main amd64 libsuitesparseconfig5 amd64 1:5.7.1+dfsg-2 [9736 B]
Get:2 http://ppa.launchpad.net/c2d4u.team/c2d4u4.0+/ubuntu focal/main amd64 r-cran-slam amd64 0.1-47-2.1~ubuntu20.04.1~ppa1 [183 kB]
Get:3 http://archive.ubuntu.com/ubuntu focal/main amd64 libamd2 amd64 1:5.7.1+dfsg-2 [20.0 kB]
Get:4 http://archive.ubuntu.com/ubuntu focal/main amd64 libcolamd2 amd64 1:5.7.1+dfsg-2 [17.0 kB]
Get:5 http://archive.ubuntu.com/ubuntu focal/main amd64 libltdl7 amd64 2.4.6-14 [38.5 kB]
Get:6 http://archive.ubuntu.com/ubuntu focal/universe amd64 libglpk40 amd64 4.65-2 [378 kB]
Get:7 http://ppa.launchpad.net/c2d4u.team/c2d4u4.0+/ubuntu focal/main amd64 r-cran-rglpk amd64 0.6-4-1.1~ubuntu20.04.1~ppa1 [58.1 kB]
Fetched 705 kB in 0s (0 B/s)
Selecting previously unselected package libsuitesparseconfig5:amd64.
(Reading database ... 20576 files and directories currently installed.)
Preparing to unpack .../0-libsuitesparseconfig5_1%3a5.7.1+dfsg-2_amd64.deb ...
Unpacking libsuitesparseconfig5:amd64 (1:5.7.1+dfsg-2) ...
Selecting previously unselected package libamd2:amd64.
Preparing to unpack .../1-libamd2_1%3a5.7.1+dfsg-2_amd64.deb ...
Unpacking libamd2:amd64 (1:5.7.1+dfsg-2) ...
Selecting previously unselected package libcolamd2:amd64.
Preparing to unpack .../2-libcolamd2_1%3a5.7.1+dfsg-2_amd64.deb ...
Unpacking libcolamd2:amd64 (1:5.7.1+dfsg-2) ...
Selecting previously unselected package libltdl7:amd64.
Preparing to unpack .../3-libltdl7_2.4.6-14_amd64.deb ...
Unpacking libltdl7:amd64 (2.4.6-14) ...
Selecting previously unselected package libglpk40:amd64.
Preparing to unpack .../4-libglpk40_4.65-2_amd64.deb ...
Unpacking libglpk40:amd64 (4.65-2) ...
Selecting previously unselected package r-cran-slam.
Preparing to unpack .../5-r-cran-slam_0.1-47-2.1~ubuntu20.04.1~ppa1_amd64.deb ...
Unpacking r-cran-slam (0.1-47-2.1~ubuntu20.04.1~ppa1) ...
Selecting previously unselected package r-cran-rglpk.
Preparing to unpack .../6-r-cran-rglpk_0.6-4-1.1~ubuntu20.04.1~ppa1_amd64.deb ...
Unpacking r-cran-rglpk (0.6-4-1.1~ubuntu20.04.1~ppa1) ...
Setting up r-cran-slam (0.1-47-2.1~ubuntu20.04.1~ppa1) ...
Setting up libltdl7:amd64 (2.4.6-14) ...
Setting up libsuitesparseconfig5:amd64 (1:5.7.1+dfsg-2) ...
Setting up libamd2:amd64 (1:5.7.1+dfsg-2) ...
Setting up libcolamd2:amd64 (1:5.7.1+dfsg-2) ...
Setting up libglpk40:amd64 (4.65-2) ...
Setting up r-cran-rglpk (0.6-4-1.1~ubuntu20.04.1~ppa1) ...
Processing triggers for libc-bin (2.31-0ubuntu9.1) ...
edd using rob:~$
--
https://dirk.eddelbuettel.com | @eddelbuettel | edd using debian.org
More information about the R-package-devel
mailing list