Home » Coding » Error: package ‘Rcompression’ is not installed for ‘arch=i386’

Error: package ‘Rcompression’ is not installed for ‘arch=i386’

* installing *source* package ‘ROpenOffice’ ...
** R
** inst
** preparing package for lazy loading
** help
*** installing help indices
** building package indices
** testing if installed package can be loaded
*** arch - i386
Error : package ‘Rcompression’ is not installed for 'arch=i386'
Fehler: Laden fehlgeschlagen
Ausführung angehalten
*** arch - x86_64
Fehler: loading failed for ‘i386’

For some time now, I have been unable to get around this error message when manually compiling and installing R-packages from source. Evidently is R both as 32- and 64-Bit binary on my system, but of the two I only use the latter. When trying now to install those 64-bit-packages from source, some packages seem to want to compile their 32-bit equivalents as well and abort, when some of their dependencies are not installed as a 32-bit binary, but only as a 64-bit one.

During research I now came across a way to install the needed dependencies manually over the command line:

R CMD INSTALL Rcompression_0.93-2.tar.gz

Of course, this simple step did not solve the problem, since this is very same command R uses, when I try to install packages from source via the user interface. This is still of use, however, if one knows how to choose the architecture for installation with this command.

R --arch=x86_64 CMD INSTALL Rcompression_0.93-2.tar.gz

Now only the 64-bit part of the package will be installed and compiled. But my 64-bit package aborted because it also needed the 32-bit part of this dependency-package for compilation in addition to the 64-bit part. How do I manage that?

R --arch=x86_64 CMD INSTALL Rcompression_0.93-2.tar.gz
R --arch=i386 CMD INSTALL --libs-only Rcompression_0.93-2.tar.gz

The first command will install the normal 64-bit libs and binaries for the package. And the second command will only install the 32-bit libs, but not the 32-bit binaries, thereby NOT overwriting the 64-bit ones. Very important, of course, is to add the --libs-only for the architecture you do NOT want to use afterwards, but just install for the other package to be happy.

Et voilà! It works:

** R
** inst
** preparing package for lazy loading
** help
*** installing help indices
** building package indices
** testing if installed package can be loaded
*** arch - i386
*** arch - x86_64
* DONE (ROpenOffice)
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

twitter

%d bloggers like this: