0

We wanted to try the biopieces tools, which require certain dependencies, such as ruby and perl, a.o. After running the installers, and consequently installing some ruby gems, we were not able to run our regular linux 'make' command anymore:

~$ make

/var/lib/gems/1.9.1/gems/make-0.3.1/bin/make:1:in `top (required)>': uninitialized constant ELF (NameError)
        from /usr/local/bin/make:23:in `load'
        from /usr/local/bin/make:23:in `<main>'

If we specify the root directory /usr/bin/make, it does work.

For now, we are not using biopieces and we could uninstall everything. Is it possible to fix this, to get back where we were before?

1

If you look at ruby_installer.sh in the links you mentioned, you'll see that it ends with:

echo "All done. Now append the following to your ~/.bashrc file:"
echo "export PATH=\"$ruby_dir/bin:\$PATH\""
echo "Done"

That means that $ruby_dir/bin (example: /usr/local/myruby/bin) is now the first place where the shell will try to find programs.

To change that, just echo your PATH variable and change it so /usr/local/myruby/bin will be the last place to check. For example:

# echo $PATH
/usr/local/myruby/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin

# export PATH=/sbin:/bin:/usr/sbin:/usr/bin:/root/bin:/usr/local/myruby/bin

# echo $PATH
/sbin:/bin:/usr/sbin:/usr/bin:/root/bin:/usr/local/myruby/bin

And don't forget to change back the PATH in your .bashrc as specified in the script.

  • ruby_dir="$HOME/ruby_install" but message comes from /usr/local/bin/make – Evgeny Vereshchagin Jul 28 '15 at 15:03
  • @EvgenyVereshchagin I think the first comes from /var/lib/gems/1.9.1/gems/make-0.3.1/bin/make. Maybe there are some symlinks or scripts calling /usr/local/bin/make. The best would be to have the output of which make, then we'd see clearer. – apaul Jul 28 '15 at 15:06
  • I suppose that there is a script /usr/local/bin/make and /usr/local/bin appears before /usr/bin in PATH – Evgeny Vereshchagin Jul 28 '15 at 15:11
  • message comes from make. @fibar Try gem uninstall -a -x make; hash -r; – Evgeny Vereshchagin Jul 28 '15 at 15:15
  • @EvgenyVereshchagin gem uninstall -a -x make; hash -r; solved it. Should I answer this post with the solution to finish? – fibar Jul 29 '15 at 14:37
0

Combining the Answer&Comments we received, we got it solved. First we confirmed that 'make' was being invoked from /usr/local/bin, which appeared before /usr/bin in PATH indeed. And then we removed the ruby 'make' from /usr/local/bin. Here's the step by step:

$ which make
$ echo $PATH
$ gem uninstall -a -x make; hash -r;

Now our Linux 'make' is working as usual ;-)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.