Installing GNU parallel without root permission

妖精的绣舞 提交于 2019-12-23 19:15:07

问题


EDIT 2

After trying to run parallel, I am getting the following on the terminal when I run both parallel and by the source /homedtic/gsantamaria/parallel/bin/parallel:

perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
    LANGUAGE = "en_US:en",
    LC_ALL = (unset),
    LC_PAPER = "en_GB.UTF-8",
    LC_ADDRESS = "en_GB.UTF-8",
    LC_MONETARY = "en_GB.UTF-8",
    LC_NUMERIC = "en_GB.UTF-8",
    LC_TELEPHONE = "en_GB.UTF-8",
    LC_IDENTIFICATION = "en_GB.UTF-8",
    LC_MEASUREMENT = "en_GB.UTF-8",
    LC_TIME = "en_GB.UTF-8",
    LC_NAME = "en_GB.UTF-8",
    LANG = "en_US.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").

Note: the process is still running even after the above output.

EDIT 1:

My pwd is /homedtic/gsantamaria/parallel-20100424 and I ran

  • ./configure --prefix=/homedtic/gsantamaria/parallel (note- I created the folder parallel)
  • make
  • make install

However, after everything, now when I try to run parallel it says bash: parallel: command not found.

For reference, after I ran the 3 commands,it gave the following output for each of the three steps:

  1. Step 1:

/configure:

checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
configure: creating ./config.status
config.status: creating Makefile
config.status: creating src/Makefile
config.status: creating config.h
config.status: config.h is unchanged
  1. Step 2:

make

make  all-recursive
make[1]: Entering directory `/homedtic/gsantamaria/parallel-20100424'
Making all in src
make[2]: Entering directory `/homedtic/gsantamaria/parallel-20100424/src'
pod2man --release='20100424' --center='parallel' \
        --section=1 ./parallel > ./parallel.1
make[2]: Leaving directory `/homedtic/gsantamaria/parallel-20100424/src'
make[2]: Entering directory `/homedtic/gsantamaria/parallel-20100424'
make[2]: Leaving directory `/homedtic/gsantamaria/parallel-20100424'
make[1]: Leaving directory `/homedtic/gsantamaria/parallel-20100424'


I am trying to install GNU's parallel on a server where I don't have access to sudo. I downloaded parallel , used SCP to transfer from local to server, and as per read me I have to do three steps to install:
  1. Step3:

make install

Making install in src
make[1]: Entering directory `/homedtic/gsantamaria/parallel-20100424/src'
make[2]: Entering directory `/homedtic/gsantamaria/parallel-20100424/src'
test -z "/homedtic/gsantamaria/parallel/bin" || /bin/mkdir -p "/homedtic/gsantamaria/parallel/bin"
 /usr/bin/install -c parallel '/homedtic/gsantamaria/parallel/bin'
test -z "/homedtic/gsantamaria/parallel/share/man/man1" || /bin/mkdir -p "/homedtic/gsantamaria/parallel/share/man/man1"
 /usr/bin/install -c -m 644 parallel.1 '/homedtic/gsantamaria/parallel/share/man/man1'
make[2]: Leaving directory `/homedtic/gsantamaria/parallel-20100424/src'
make[1]: Leaving directory `/homedtic/gsantamaria/parallel-20100424/src'
make[1]: Entering directory `/homedtic/gsantamaria/parallel-20100424'
make[2]: Entering directory `/homedtic/gsantamaria/parallel-20100424'
make[2]: Nothing to be done for `install-exec-am'.
make[2]: Nothing to be done for `install-data-am'.
make[2]: Leaving directory `/homedtic/gsantamaria/parallel-20100424'
make[1]: Leaving directory `/homedtic/gsantamaria/parallel-20100424'

Original question:

  1. ./configure
  2. make
  3. make install

I have successfully done the first 2 steps but in the 3rd step, that is make install, it gives the following error:

making install in src
make[1]: Entering directory `/homedtic/gsantamaria/parallel-20100424/src'
make[2]: Entering directory `/homedtic/gsantamaria/parallel-20100424/src'
test -z "/usr/local/bin" || /bin/mkdir -p "/usr/local/bin"
 /usr/bin/install -c parallel '/usr/local/bin'
/usr/bin/install: cannot create regular file `/usr/local/bin/parallel': Permission denied
make[2]: *** [install-binSCRIPTS] Error 1
make[2]: Leaving directory `/homedtic/gsantamaria/parallel-20100424/src'
make[1]: *** [install-am] Error 2
make[1]: Leaving directory `/homedtic/gsantamaria/parallel-20100424/src'
make: *** [install-recursive] Error 1

I think the main line is

/usr/bin/install: cannot create regular file /usr/local/bin/parallel': Permission denied

I wanted to change the instance of this path in all files that contain it to a path which can be accessed without sudo or root permissions. However, when I try grep, I find no files that contain it.

grep -r "/usr/local/bin/parallel" *

What can I do now? Or, how can I possibly install parallel without root permissions?

I tried checking this but still didn't help.

Any suggestions? Thanks in advance!


回答1:


./configure --prefix=<target>

This will make the installation in <target>/bin, <target>/lib etc.; just do the make install as usual.

Choose a <target> you have access to (something in ${HOME} if need be), and adjust your PATH to include <target>/bin (and, perhaps, MANPATH to include <target>/share/man so you get access to the man pages as well).




回答2:


You might consider using linuxbrew (http://linuxbrew.sh)

brew install parallel



回答3:


The script http://git.savannah.gnu.org/cgit/parallel.git/tree/10seconds_install first tries an install requiring root; then a personal installation and if that fails too: a minimal installation.

It might just work for you out of the box, and if not, then it might serve as inspiration.




回答4:


If you have conda, conda install parallel is also a one-line solution.




回答5:


This did it for me, without root access:

(wget pi.dk/3 -qO - ||  curl pi.dk/3/) | bash

See this link.



来源:https://stackoverflow.com/questions/32093425/installing-gnu-parallel-without-root-permission

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!