問題描述
將 R 包從 32 位安裝到 64 位 (install R package from 32bit to 64bit)
I have this R package (MRwarping_1.0.zip). It installs on the 32bit windows PC of a colleague but fails to install on my 64bit ubuntu (and gives a very strange error message). I was wondering whether
- I can install it (on my 64 bit ubuntu).
- if yes, what are the requiered steps to do that
‑‑‑‑‑
參考解法
方法 1:
MRwarping_1.0.zip is a Windows binary build of the package. You need the package source to be able to install it on anything other than Windows.
方法 2:
In addition to Joshua's answer, this error happened to me also when I tried to install a package that was a binary build for Linux, but compressed in .zip
format instead of .tar.gz
format.
So, when you install a binary package for Linux, it must be a .tar.gz
file. You can use tools like 7‑zip to uncompress the .zip
file and recompress it as .tar.gz
. Alternatively, use unzip ZIPFILE
to extract the zip into a folder and tar ‑czf package.tar.gz FOLDER
to recompress the folder to a .tar.gz
‑file.
(by user189035、Joshua Ulrich、akraf)