Skip to content

Problem when installing lme4 under Debian stretch

6 messages · John Woodard, Dirk Eddelbuettel, Johannes Ranke

#
I am a new user in the Linux environment and recently encountered an error
when trying to install the car package. The error was related to
installation of a dependency (lme4). Here is the output from the
installation:

* installing *source* package ?lme4? ...
** package ?lme4? successfully unpacked and MD5 sums checked
** libs
g++  -I/usr/share/R/include -DNDEBUG
 -I"/usr/local/lib/R/site-library/Rcpp/include"
-I"/usr/local/lib/R/site-library/RcppEigen/include"   -DNDEBUG
-DEIGEN_DONT_VECTORIZE -fpic  -g -O2
-fdebug-prefix-map=/root/git/r-backports/stretch/r-base-3.4.2=.
-fstack-protector-strong -Wformat -Werror=format-security -Wdate-time
-D_FORTIFY_SOURCE=2 -g  -c external.cpp -o external.o
In file included from external.cpp:8:0:
predModule.h:12:23: fatal error: RcppEigen.h: No such file or directory
 #include <RcppEigen.h>
                       ^
compilation terminated.
/usr/lib/R/etc/Makeconf:168: recipe for target 'external.o' failed
make: *** [external.o] Error 1
ERROR: compilation failed for package ?lme4?
* removing ?/usr/local/lib/R/site-library/lme4?

I am using Raspbian Stretch with a Raspberry Pi. Might someone have a
suggestion about how to proceed?  Many thanks in advance!

John
#
I would start with the _binary_ package you can install via

   sudo apt-get install r-cran-car

which will take care of all dependecies.

Building some of these package on small hardware can be challenging simply
due to lack of RAM --- and ditto for minimal cloud instances with small RAM
footprint.  Use binaries where you can if you hardware cannot cope.

Dirk
#
Thanks very much, Dirk! I gave that a try and got the following:
pi at raspberrypi:~ $ sudo apt-get install r-cran-car
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 r-cran-car : Depends: r-api-3
              Depends: r-cran-pbkrtest but it is not going to be installed
              Depends: r-cran-quantreg but it is not going to be installed
E: Unable to correct problems, you have held broken packages.


Given the message, should I assume that lme4 (and car) cannot be installed
on my setup?  Many thanks in advance!
On Sat, Oct 21, 2017 at 2:22 PM, Dirk Eddelbuettel <edd at debian.org> wrote:

            

  
  
#
On 21 October 2017 at 15:04, John Woodard wrote:
| Thanks very much, Dirk! I gave that a try and got the following:
| pi at raspberrypi:~ $ sudo apt-get install r-cran-car
| Reading package lists... Done
| Building dependency tree
| Reading state information... Done
| Some packages could not be installed. This may mean that you have
| requested an impossible situation or if you are using the unstable
| distribution that some required packages have not yet been created
| or been moved out of Incoming.
| The following information may help to resolve the situation:
| 
| The following packages have unmet dependencies:
|  r-cran-car : Depends: r-api-3
|               Depends: r-cran-pbkrtest but it is not going to be installed
|               Depends: r-cran-quantreg but it is not going to be installed
| E: Unable to correct problems, you have held broken packages.
| 
| 
| Given the message, should I assume that lme4 (and car) cannot be installed
| on my setup?  Many thanks in advance!

It looks like you may have repos mixed, or they are out of sync.

The r-base-core you use should provide r-api-3.  Maybe it is newer and it
offers r-api-3.4 -- which the r-cran-car you try to install does not yet
depend on.  So the repo may be out of sync.

If that is the case -- well I was forced to add r-api-3.4 which creates this
bug "because it would make things better".  I disagreed but was overruled. It
all depends.

For what it is worth, on my Ubuntu box on which I type this, both 'apt-cache
show r-base-core' and 'apt-cache show r-cran-cran' want r-api-3.

On Debian testing is should match too.  Maybe the Raspian repo you have needs
to catch up.

Dirk

|
| On Sat, Oct 21, 2017 at 2:22 PM, Dirk Eddelbuettel <edd at debian.org> wrote:
| 
| >
| > I would start with the _binary_ package you can install via
| >
| >    sudo apt-get install r-cran-car
| >
| > which will take care of all dependecies.
| >
| > Building some of these package on small hardware can be challenging simply
| > due to lack of RAM --- and ditto for minimal cloud instances with small RAM
| > footprint.  Use binaries where you can if you hardware cannot cope.
| >
| > Dirk
| >
| > --
| > http://dirk.eddelbuettel.com | @eddelbuettel | edd at debian.org
| >
| 
| 	[[alternative HTML version deleted]]
| 
| _______________________________________________
| R-SIG-Debian mailing list
| R-SIG-Debian at r-project.org
| https://stat.ethz.ch/mailman/listinfo/r-sig-debian
#
Hi,

apparently you are using the backport of R 3.4.2, which provides r-api-3.4.
With this backport installed, you cannot use the binary packages from the 
stretch archive.
You should still be able to install car from within R, which you tried. On my 
raspi system using the unofficial Debian stretch image from 

  https://wiki.debian.org/RaspberryPi3

I had to install ed (apt install ed) in order to get the dependency nloptr to 
compile. Now the compilation of the dependency RcppEigen is running (which 
seems to have failed or was interrupted on your system, judging by the error 
message you posted). Surely more than five minutes ago my raspi started to 
compile the file fastLm.cpp ...

I will let you know if I succeed. But Dirk is right when he points out that 
the efficiency of using such a system to compile lots of source packages is 
questionable. Maybe it would be a solution to deinstall the backport, remove 
the stretch-cran34 line from your sources.list and install everything from the 
stretch archive. R version 3.3.3 from stretch is still sort of recent...

Johannes

  
    
#
It only worked after activating swap.

However, this is not recommended  when using an SD card as file system...

So maybe it would be better to stick to the stretch packages.

Kind regards,

Johannes