在 Ubuntu 14.04 上安装 GNU 并行实用程序

在 Ubuntu 14.04 上安装 GNU 并行实用程序

我正在尝试在本地 ubuntu 14.04 上安装 GNU 并行实用程序。我从以下位置下载了 tar 文件http://ftp.gnu.org/gnu/parallel/

版本是parallel-20140622.tar.bz2

它被下载到我的下载文件夹中,然后我打开一个终端,将目录更改为下载,然后使用

tar -xjf parallel-20140622.tar.bz2 ; cd parallel-20140622; ./configure ; make;make install

但它给了我这个错误:

varun@varun-OptiPlex-760:~/Downloads/parallel-20140622$ make
make  all-recursive
make[1]: Entering directory `/home/varun/Downloads/parallel-20140622'
Making all in src
make[2]: Entering directory `/home/varun/Downloads/parallel-20140622/src'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/home/varun/Downloads/parallel-20140622/src'
make[2]: Entering directory `/home/varun/Downloads/parallel-20140622'
make[2]: Leaving directory `/home/varun/Downloads/parallel-20140622'
make[1]: Leaving directory `/home/varun/Downloads/parallel-20140622'
varun@varun-OptiPlex-760:~/Downloads/parallel-20140622$ make install
Making install in src
make[1]: Entering directory `/home/varun/Downloads/parallel-20140622/src'
make[2]: Entering directory `/home/varun/Downloads/parallel-20140622/src'
 /bin/mkdir -p '/usr/local/bin'
 /usr/bin/install -c parallel sem sql niceload '/usr/local/bin'
/usr/bin/install: cannot create regular file ‘/usr/local/bin/parallel’: Permission denied
/usr/bin/install: cannot create regular file ‘/usr/local/bin/sem’: Permission denied
/usr/bin/install: cannot create regular file ‘/usr/local/bin/sql’: Permission denied
/usr/bin/install: cannot create regular file ‘/usr/local/bin/niceload’: Permission denied
make[2]: *** [install-binSCRIPTS] Error 1
make[2]: Leaving directory `/home/varun/Downloads/parallel-20140622/src'
make[1]: *** [install-am] Error 2
make[1]: Leaving directory `/home/varun/Downloads/parallel-20140622/src'
make: *** [install-recursive] Error 1

如何解决这个问题?

答案1

您应该能够使用 apt-get 安装它。根据“在哪里可以获得 GNU Parallel 软件包?“:

sudo apt-get install parallel

不过,在您的特定情况下,您需要运行sudo make install而不是仅仅运行make install。或者,您需要为配置脚本指定一个新的根目录。

答案2

sudo此步骤需要权限make install。因此请尝试:
./configure && make && sudo make install

相关内容