hogihung

hogihung

I am trying to install Elixir on a new server. The servers is running Oracle Linux (Redhat) 6. I get the following error:

 [root@inara elixir]# make clean test
cd lib/elixir && "/tmp/elixir/rebar" clean
/bin/sh: /tmp/elixir/rebar: Permission denied
make: *** [clean] Error 126
[root@inara elixir]#
[root@inara elixir]# uname -a
Linux inara 2.6.39-400.290.2.el6uek.x86_64 #1 SMP Fri Nov 18 10:05:15 PST 2016 x86_64 x86_64 x86_64 GNU/Linux
[root@inara elixir]# 

I tried compiling with both Erlang 20 and 19. Any suggestions?

Hogi…

Showing Posts 1 to 5

NobbZ

NobbZ

My first guess is that the file /tmp/elicir/rebar is not executable.

Please use ls -l /tmp/elixir/rebar to check. In the first colum of the output there should be -rwxr-xr-x. If the xs are missing, please use chmod 755 /tmp/elixir/rebar to make it executable.


But may I ask how you got the sources? When pulling from the git-repository or when downloading the tarballs, executable should be set already.

hogihung

hogihung OP

Thank you for the reply. I noticed that this image of the VM was using a umask of 0077 which could mess with the permissions. I rebuilt the VM and changed the umask to 022 and tried again. But I’m running into the same issues:

cd /tmp
git clone https://github.com/elixir-lang/elixir.git
cd elixir
make clean test

[root@localhost elixir]# make clean test
cd lib/elixir && "/tmp/elixir/rebar" clean
/bin/sh: /tmp/elixir/rebar: Permission denied
make: *** [clean] Error 126
[root@localhost elixir]#

[root@localhost elixir]# ls -la

drwxr-xr-x. 7 root root   4096 Sep 10 13:39 .
drwxrwxrwt. 4 root root   4096 Sep 10 13:38 ..
-rw-r--r--. 1 root root    373 Sep 10 13:39 .appveyor.yml
drwxr-xr-x. 2 root root   4096 Sep 10 13:39 bin
-rw-r--r--. 1 root root    780 Sep 10 13:39 CHANGELOG.md
-rw-r--r--. 1 root root   3675 Sep 10 13:39 CODE_OF_CONDUCT.md
drwxr-xr-x. 8 root root   4096 Sep 10 13:39 .git
-rw-r--r--. 1 root root     50 Sep 10 13:39 .gitattributes
-rw-r--r--. 1 root root    222 Sep 10 13:39 .gitignore
-rw-r--r--. 1 root root    507 Sep 10 13:39 ISSUE_TEMPLATE.md
drwxr-xr-x. 8 root root   4096 Sep 10 13:39 lib
-rw-r--r--. 1 root root  11343 Sep 10 13:39 LICENSE
-rw-r--r--. 1 root root   9740 Sep 10 13:39 Makefile
drwxr-xr-x. 2 root root   4096 Sep 10 13:39 man
-rw-r--r--. 1 root root    825 Sep 10 13:39 NOTICE
-rw-r--r--. 1 root root   7229 Sep 10 13:39 README.md
-rwxr-xr-x. 1 root root 164740 Sep 10 13:39 rebar
-rwxr-xr-x. 1 root root 530454 Sep 10 13:39 rebar3
-rw-r--r--. 1 root root    674 Sep 10 13:39 rebar.config
-rw-r--r--. 1 root root   1232 Sep 10 13:39 RELEASE.md
drwxr-xr-x. 2 root root   4096 Sep 10 13:39 src
-rw-r--r--. 1 root root    575 Sep 10 13:39 .travis.yml
-rw-r--r--. 1 root root      9 Sep 10 13:39 VERSION
[root@localhost elixir]#

[root@localhost elixir]# erl --version
Erlang/OTP 20 [erts-9.0] [source] [64-bit] [smp:2:2] [ds:2:2:10] [async-threads:10] [hipe] [kernel-poll:false]

Eshell V9.0  (abort with ^G)
1>

[root@localhost elixir]# uname -a
Linux inara 2.6.39-400.290.2.el6uek.x86_64 #1 SMP Fri Nov 18 10:05:15 PST 2016 x86_64 x86_64 x86_64 GNU/Linux
[root@localhost elixir]#

Just for grins and giggles I manually chmod 755 the rebar file but the result is the same. :frowning:

Hogi…

NobbZ

NobbZ

Can you run that rebar manually? ./rebar --version?

edit
I had something similar ages ago. Please check if env is available in $PATH, especially when you installed a minimal VM it might be missing… If I’m right here, you might need to find the correct package on your own…

hogihung

hogihung OP

[root@inara elixir]# ./rebar --version
-bash: ./rebar: Permission denied
[root@inara elixir]#

It does appear that the umask of 077 may have been the issue. While I’m still having an error as the root user, even after logging out and back in, I was able to do the following as my users:

cd /tmp
mkdir elixir
cd elixir
wget https://github.com/elixir-lang/elixir/archive/v1.4.5.tar.gz
gunzip v1.4.5.tar.gz
tar -xvf v1.4.5.tar
cd elixir-1.4.5/
make clean test
sudo make install

[jfhogarty@inara tmp]$ iex
Erlang/OTP 20 [erts-9.0] [source] [64-bit] [smp:2:2] [ds:2:2:10] [async-threads:10] [hipe] [kernel-poll:false]

Interactive Elixir (1.4.5) - press Ctrl+C to exit (type h() ENTER for help)
iex(1)>

I continue to have the permissions problems if I clone the repo, either as root or as a user.

hogihung

hogihung OP

Ok, first thank you NobbZ as your responses got me thinking in the correct direction. I found the problem which is two fold.

  1. This base VM (which is a standard where I work) had a umask of 0077.
  2. The /tmp directory seems to have some special permissions

The error message had me looking in the wrong direction. I have now been able to, as booth root and a user, download/git clone both 1.4.5 and 1.5.x and compile. What I needed to do was to download/clone the files into a different directory as /tmp permissions were the issue.

Hogi…

— All posts loaded —

Where Next? Top

Trending in Questions Top

RSP87
I’m working on a project that simulates the bumbl example in the programming phoenix book. It acts almost like an email client. We have a...
New
kszambelanczyk
Hello! Could someone please give me a help/sample code, how to delete a file from s3 using waffle/waffle_ecto from Phoenix app. I creat...
New
RemyXRenard
I’m seeing that a list inside a Kino.DataTable will be interpreted as a charlist, even if the Kino.configure() is set to charlists: :as_l...
New
velrest
So my question is quite simple and i have found no conclusive answer on forum, google or AI. Should we use :erlang.float for Integer to ...
New
samoloth
Hi, I’ve just set up an application with ash_authentication. There is only magic link strategy for now, so there is no confirmation add o...
New
FlyingNoodle
If a change or preparation module uses Ash.Changeset.get_argument/2 or Ash.Query.get_argument/2 (or any of the other get_argument functio...
New
nseaSeb
Hello, I know there is an approach for handling lists that allows for optimized traversal, but I can’t recall the specific method (somet...
New

Other Trending Topics Top

mudasobwa
I am happy to introduce the very α version of the new programming language compiled to BEAM. Welcome Cure. It has literally three kille...
New
marciok
Hi there! We created Gust: A task orchestrator inspired by Airflow. For those who have never heard about Aiflow, it’s a Python-based wor...
New
jimsynz
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
Dmk
Xamal is a deployment tool for Elixir apps that deploys native releases to bare metal servers over SSH. It’s a port of GitHub - basecamp/...
New
Damirados
Hello everyone. After busy few months I am happy to announce v0.1.0 of Emerge & Solve. They are GUI (Emerge) and State management (S...
New
netoum
Corex is an accessible, unstyled UI component library for Phoenix that integrates Zag.js state machines using Vanilla JavaScript and Live...
New

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews