Installing GNU parallel without root permission - linux

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:
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
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:
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:
./configure
make
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!

./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).

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

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

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.

This did it for me, without root access:
(wget pi.dk/3 -qO - || curl pi.dk/3/) | bash
See this link.

Related

Error during make gcc: "cp: Permission denied"

What I did
In my initially empty build directory, I configure gcc with
/home/anthony/Documents/gcc-pi/gcc/configure --prefix=/opt/gcc --enable-multilib --disable-shared --enable-static --disable-bootstrap --disable-libstdcxx-pch --enable-languages=all --enable-libgomp --enable-threads=posix --enable-tls --with-system-zlib --with-isl --enable-__cxa_atexit --enable-host-shared CFLAGS='-lpthread -fPIC' CXXFLAGS='-lpthread -fPIC' CPPFLAGS='-fPIC'
I then issue make and after some successful building, the build ultimately fails with the following
make[2]: Entering directory '/home/anthony/Documents/gcc/gcc'
mkdir -p ada/bldtools/sinfo
rm -f ada/bldtools/sinfo/sinfo.ads ada/bldtools/sinfo/sinfo.adb ada/bldtools/sinfo/xsinfo.adb ada/bldtools/sinfo/csinfo.adb
cp -p /home/anthony/Documents/gcc-pi/gcc/gcc/ada/sinfo.ads /home/anthony/Documents/gcc-pi/gcc/gcc/ada/sinfo.adb /home/anthony/Documents/gcc-pi/gcc/gcc/ada/xsinfo.adb /home/anthony/Documents/gcc-pi/gcc/gcc/ada/csinfo.adb ada/bldtools/sinfo
make[2]: cp: Permission denied
make[2]: *** [/home/anthony/Documents/gcc-pi/gcc/gcc/ada/Make-generated.in:44: ada/sinfo.h] Error 127
make[2]: Leaving directory '/home/anthony/Documents/gcc/gcc'
make[1]: *** [Makefile:4411: all-gcc] Error 2
make[1]: Leaving directory '/home/anthony/Documents/gcc'
make: *** [Makefile:970: all] Error 2
What I tried
I've tried
sudo make
sudo chmod 777 -R the gcc source and build directories
sudo cp -p /home/anthony/Documents/gcc-pi/gcc/gcc/ada/sinfo.ads /home/anthony/Documents/gcc-pi/gcc/gcc/ada/sinfo.adb /home/anthony/Documents/gcc-pi/gcc/gcc/ada/xsinfo.adb /home/anthony/Documents/gcc-pi/gcc/gcc/ada/csinfo.adb ada/bldtools/sinfod ```
all of which failed at advancing the build. Note that the last command succeeds, but when I try to continue the build after that, it yields the same error.
Any ideas? Thanks in advance.
Had same issue. Looks like the problem relates to gcc package due to the fact that it contains "cp" directory. Solution was found in "https://aur.archlinux.org/packages/libgccjit/?O=10&PP=10". In my case i had "." folder in my PATH environment variable. Removing it made compilation process to continue.
Edit ./gcc/Makefile
replace cp with /usr/bin/cp

`make release_tests` fails after ./configure in fresh Erlang installation

I cloned, make, ./configure then make release_tests
There is a ./make/target.mk in the root otp directory but not in ./lib/common_test/test_server
root#marble-pyramid-1:~/download/otp_src_20.0# make release_tests
if test -f lib/common_test/test_server/Makefile; then \
(cd lib/common_test/test_server; make TESTROOT="/root/download/otp_src_20.0/release/tests" \
PATH=/root/download/otp_src_20.0/bin/:/root/download/otp_src_20.0/bootstrap/bin:"${PATH}" release_tests) || exit $?; \
fi
make[1]: Entering directory `/root/download/otp_src_20.0/lib/common_test/test_server
Makefile:21: /make/target.mk: No such file or directory
Makefile:26: /make/x86_64-unknown-linux-gnu/otp.mk: No such file or directory
Makefile:85: /make/otp_release_targets.mk: No such file or directory
make[1]: *** No rule to make target `/make/otp_release_targets.mk'. Stop.
make[1]: Leaving directory `/root/download/otp_src_20.0/lib/common_test/test_server'
make: *** [lib/common_test/test_server] Error 2
root#marble-pyramid-1:~/download/otp_src_20.0# ls lib/common_test/test_server/
config.guess configure.in install-sh ts_benchmark.erl ts_erl_config.erl ts_install.erl ts_run.erl
config.sub conf_vars.in Makefile ts.config ts.hrl ts_lib.erl ts.unix.config
configure cross.cover ts_autoconf_win32.erl ts.erl ts_install_cth.erl ts_make.erl ts.win32.config
root#marble-pyramid-1:~/download/otp_src_20.0# ls lib/common_test/test_server/make
ls: cannot access lib/common_test/test_server/make: No such file or directory
EDIT:
root#marble-pyramid-1:~/download/otp_src_20.0# ERL_TOP=$HOME/download/otp_src_20.0
root#marble-pyramid-1:~/download/otp_src_20.0# echo $ERL_TOP
/root/download/otp_src_20.0
root#marble-pyramid-1:~/download/otp_src_20.0# make release_test
make: *** No rule to make target `release_test'. Stop.
root#marble-pyramid-1:~/download/otp_src_20.0# make release_tests
if test -f lib/common_test/test_server/Makefile; then \
(cd lib/common_test/test_server; make TESTROOT="/root/download/otp_src_20.0/release/tests" \
PATH=/root/download/otp_src_20.0/bin/:/root/download/otp_src_20.0/bootstrap/bin:"${PATH}" release_tests) || exit $?; \
fi
make[1]: Entering directory `/root/download/otp_src_20.0/lib/common_test/test_server'
Makefile:21: /make/target.mk: No such file or directory
Makefile:26: /make/x86_64-unknown-linux-gnu/otp.mk: No such file or directory
Makefile:85: /make/otp_release_targets.mk: No such file or directory
make[1]: *** No rule to make target `/make/otp_release_targets.mk'. Stop.
make[1]: Leaving directory `/root/download/otp_src_20.0/lib/common_test/test_server'
make: *** [lib/common_test/test_server] Error 2
root#marble-pyramid-1:~/download/otp_src_20.0#
The question says the OP ran make, then ./configure, then make release_tests, but this is incorrect; one always runs configure before make.
Building the release_tests target succeeded using the following steps in bash on a Mac running macOS Sierra 10.12.6:
$ curl -LO http://erlang.org/download/otp_src_20.0.tar.gz
$ tar xf otp_src_20.0.tar.gz
$ cd otp_src_20.0
$ export ERL_TOP=$PWD
$ ./configure
$ make -j16
$ make release_test
I'm sure this would work on Linux or any other UNIX variant as well.

Error when installing mosquitto with websockets on centos 7

I have followed the next steps:
sudo yum groupinstall "Development Tools"
sudo yum install wget mercurial cmake openssl-devel c-ares-devel libuuid-devel
wget https://github.com/warmcat/libwebsockets/archive/v1.3-chrome37-firefox30.tar.gz
tar zxvf v1.3-chrome37-firefox30.tar.gz
cd libwebsockets-1.3-chrome37-firefox30
mkdir build; cd build;
cmake .. -DLIB_SUFFIX=64
sudo make install
To install mosquitto:
hg clone https://bitbucket.org/oojah/mosquitto
cd mosquitto
hg pull && hg update 1.4
In config.mk:
WITH_WEBSOCKETS:=yes
make binary
sudo make install
All goes well until the last line to install mosquitto... sudo make install
And this is what the console shows:
set -e; for d in lib client src; do make -C ${d}; done
make[1]: Entering directory `/home/investigador_uno/libwebsockets-1.3-chrome37-firefox30/build/mosquitto/lib'
make -C cpp
make[2]: Entering directory `/home/investigador_uno/libwebsockets-1.3-chrome37-firefox30/build/mosquitto/lib/cpp'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/home/investigador_uno/libwebsockets-1.3-chrome37-firefox30/build/mosquitto/lib/cpp'
make[1]: Leaving directory `/home/investigador_uno/libwebsockets-1.3-chrome37-firefox30/build/mosquitto/lib'
make[1]: Entering directory `/home/investigador_uno/libwebsockets-1.3-chrome37-firefox30/build/mosquitto/client'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/home/investigador_uno/libwebsockets-1.3-chrome37-firefox30/build/mosquitto/client'
make[1]: Entering directory `/home/investigador_uno/libwebsockets-1.3-chrome37-firefox30/build/mosquitto/src'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/home/investigador_uno/libwebsockets-1.3-chrome37-firefox30/build/mosquitto/src'
set -e; for d in lib client src; do make -C ${d} install; done
make[1]: Entering directory `/home/investigador_uno/libwebsockets-1.3-chrome37-firefox30/build/mosquitto/lib'
make -C cpp
make[2]: Entering directory `/home/investigador_uno/libwebsockets-1.3-chrome37-firefox30/build/mosquitto/lib/cpp'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/home/investigador_uno/libwebsockets-1.3-chrome37-firefox30/build/mosquitto/lib/cpp'
install -d /usr/local/lib/
install -s --strip-program=strip libmosquitto.so.1 /usr/local/lib/libmosquitto.so.1
ln -sf libmosquitto.so.1 /usr/local/lib/libmosquitto.so
install -d /usr/local/include/
install mosquitto.h /usr/local/include/mosquitto.h
make -C cpp install
make[2]: Entering directory `/home/investigador_uno/libwebsockets-1.3-chrome37-firefox30/build/mosquitto/lib/cpp'
install -d /usr/local/lib/
install -s --strip-program=strip libmosquittopp.so.1 /usr/local/lib/libmosquittopp.so.1
ln -sf libmosquittopp.so.1 /usr/local/lib/libmosquittopp.so
install -d /usr/local/include/
install mosquittopp.h /usr/local/include/mosquittopp.h
make[2]: Leaving directory `/home/investigador_uno/libwebsockets-1.3-chrome37-firefox30/build/mosquitto/lib/cpp'
make[1]: Leaving directory `/home/investigador_uno/libwebsockets-1.3-chrome37-firefox30/build/mosquitto/lib'
make[1]: Entering directory `/home/investigador_uno/libwebsockets-1.3-chrome37-firefox30/build/mosquitto/client'
install -d /usr/local/bin
install -s --strip-program=strip mosquitto_pub /usr/local/bin/mosquitto_pub
install -s --strip-program=strip mosquitto_sub /usr/local/bin/mosquitto_sub
make[1]: Leaving directory `/home/investigador_uno/libwebsockets-1.3-chrome37-firefox30/build/mosquitto/client'
make[1]: Entering directory `/home/investigador_uno/libwebsockets-1.3-chrome37-firefox30/build/mosquitto/src'
install -d /usr/local/sbin
install -s --strip-program=strip mosquitto /usr/local/sbin/mosquitto
install mosquitto_plugin.h /usr/local/include/mosquitto_plugin.h
install -s --strip-program=strip mosquitto_passwd /usr/local/bin/mosquitto_passwd
make[1]: Leaving directory `/home/investigador_uno/libwebsockets-1.3-chrome37-firefox30/build/mosquitto/src'
set -e; for d in man; do make -C ${d} install; done
make[1]: Entering directory `/home/investigador_uno/libwebsockets-1.3-chrome37-firefox30/build/mosquitto/man'
install -d /usr/local/share/man/man8
install -m 644 mosquitto.8 /usr/local/share/man/man8/mosquitto.8
install: cannot stat ‘mosquitto.8’: No such file or directory
make[1]: *** [install] Error 1
make[1]: Leaving directory `/home/investigador_uno/libwebsockets-1.3-chrome37-firefox30/build/mosquitto/man'
make: *** [install] Error 2
What could be the problem?
hg clone https://bitbucket.org/oojah/mosquitto
cd mosquitto
hg pull && hg update 1.4
The 1.4 branch from hg is not complete, you should you use the git repository instead: http://git.eclipse.org/c/mosquitto/org.eclipse.mosquitto.git
The problem you are seeing is related to the man pages not being built due to file locations differing from distro to distro. This is only something that is done with the unreleased code. If you download the released source instead it will be fine.

Error installing GDBM 1.10

First, i did ./configure
Then, i did make install and Terminal show this:
make[2]: Entering directory `/home/lucas/Área de Trabalho/gdbm-1.10/src'
test -z "/usr/local/lib" || /bin/mkdir -p "/usr/local/lib"
/bin/bash ../libtool --mode=install /usr/bin/install -c libgdbm.la '/usr/local/lib'
libtool: install: /usr/bin/install -c .libs/libgdbm.so.4.0.0 /usr/local/lib/libgdbm.so.4.0.0
/usr/bin/install: cannot create regular file '/usr/local/lib/libgdbm.so.4.0.0': Permission denied
make[2]: * [install-libLTLIBRARIES] Error 1
make[2]: Leaving directory `/home/lucas/Área de Trabalho/gdbm-1.10/src'
make[1]: * [install-am] Error 2
make[1]: Leaving directory `/home/lucas/Área de Trabalho/gdbm-1.10/src'
make: * [install-recursive] Error 1
Any help?
You do not have permissions to write to /usr/local/lib
sudo make install
or become root and run make install

uclinux compilation error

I'm trying to cross-compile uclinux using a toolchain provided by the hardarware manufacturer.
When I run the make command, I get an error that I cannot understand:
yannick#ubuntu:~/uclinux-dist$ make
make -C tools/ucfront
make[1]: Entering directory `/home/yannick/uclinux-dist/tools/ucfront'
make[1]: `ucfront' is up to date.
make[1]: Leaving directory `/home/yannick/uclinux-dist/tools/ucfront'
ln -sf /home/yannick/uclinux-dist/tools/ucfront/ucfront tools/ucfront-gcc
ln -sf /home/yannick/uclinux-dist/tools/ucfront/ucfront tools/ucfront-g++
make ARCH=arm CROSS_COMPILE=arm-uclinux-elf- -C linux-2.6.x || exit 1
make[1]: arm-uclinux-elf-gcc: Command not found
make[1]: Entering directory `/home/yannick/uclinux-dist/linux-2.6.x'
CHK include/linux/version.h
make[2]: `include/asm-arm/mach-types.h' is up to date.
CC arch/arm/kernel/asm-offsets.s
/bin/sh: 1: arm-uclinux-elf-gcc: not found
make[2]: *** [arch/arm/kernel/asm-offsets.s] Error 127
make[1]: *** [prepare0] Error 2
make[1]: Leaving directory `/home/yannick/uclinux-dist/linux-2.6.x'
make: *** [linux] Error 1
yannick#ubuntu:~/uclinux-dist$ locate arm-uclinux-elf-gcc
...
/usr/local/arm-uclinux-tools/bin/arm-uclinux-elf-gcc
...
yannick#ubuntu:~/uclinux-dist$ echo $PATH
/usr/local/arm-uclinux-tools/bin:/usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games
yannick#ubuntu:~/uclinux-dist$ ls -l /usr/local/bin
...
lrwxrwxrwx 1 root root 52 May 20 22:53 arm-uclinux-elf-gcc -> /usr/local/arm-uclinux-tools/bin/arm-uclinux-elf-gcc
...
yannick#ubuntu:~/uclinux-dist$ ls -l /usr/local/arm-uclinux-tools/bin/
...
-rwxr-xr-x 1 root root 81832 May 20 19:27 arm-uclinux-elf-gcc
...
yannick#ubuntu:~/uclinux-dist$
Thanks !!
The value of your path when you run make is not necessarily what it is when your command executes. I would place an echo $PATH in the actual makefile just before you attempt to compile the source file.
That will at least give an indication as to whether something is changing your path during the build process.
you should also add this in environmental variables
Path to cross-tools
export CROSS_COMPILE=arm-uclinux-elf-

Resources