简体   繁体   English

将 R 包从 32 位安装到 64 位

[英]install R package from 32bit to 64bit

I have this R package (MRwarping_1.0.zip).我有这个 R 包(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).它安装在同事的 32 位 Windows PC 上,但无法安装在我的 64 位 ubuntu 上(并给出了一个非常奇怪的错误消息)。 I was wondering whether我想知道是否

  • I can install it (on my 64 bit ubuntu).我可以安装它(在我的 64 位 ubuntu 上)。
  • if yes, what are the requiered steps to do that如果是,那么执行此操作所需的步骤是什么

MRwarping_1.0.zip is a Windows binary build of the package. MRwarping_1.0.zip 是该包的 Windows 二进制版本。 You need the package source to be able to install it on anything other than Windows.您需要软件包源才能将其安装在 Windows 以外的任何设备上。

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.除了 Joshua 的回答之外,当我尝试安装一个用于 Linux 的二进制版本的包时,这个错误也发生在我身上,但以.zip格式而不是.tar.gz格式压缩。

So, when you install a binary package for Linux, it must be a .tar.gz file.因此,当您为 Linux 安装二进制包时,它必须是.tar.gz文件。 You can use tools like 7-zip to uncompress the .zip file and recompress it as .tar.gz .您可以使用 7-zip 等工具解压缩.zip文件并将其重新压缩为.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.或者,使用unzip ZIPFILE将 zip unzip ZIPFILE压缩到一个文件夹中,然后使用tar -czf package.tar.gz FOLDER将该文件夹重新压缩为.tar.gz文件。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM