Error installing Ruby on Ubuntu 14.04 - ruby-on-rails

The following install commands:
gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3
\curl -sSL https://get.rvm.io | bash -s stable --rails
Returns this error:
Installing requirements for ubuntu.
Updating system................
Error running 'requirements_debian_update_system ruby-2.2.1',
showing last 15 lines of /home/gav/.rvm/log/1458060663_ruby- 2.2.1/update_system.log ++ /scripts/functions/logging : rvm_pretty_print() 78 > case "${TERM:- dumb}" in ++ /scripts/functions/logging : rvm_pretty_print() 81 > case "$1" in
++ /scripts/functions/logging : rvm_pretty_print() 83 > [[ -t 2 ]]
++ /scripts/functions/logging : rvm_pretty_print() 83 > return 1
++ /scripts/functions/logging : rvm_error() 117 > printf %b 'There has been error while updating '\''apt-get'\'', please give it some time and try again later.
404 errors should be fixed for rvm to proceed. Check your sources configured in:
/etc/apt/sources.list
/etc/apt/sources.list.d/*.list
\n'
There has been error while updating 'apt-get', please give it some time and try again later.
404 errors should be fixed for rvm to proceed. Check your sources configured in:
/etc/apt/sources.list
/etc/apt/sources.list.d/*.list
++ /scripts/functions/requirements/ubuntu : requirements_debian_update_system() 53 > return 100
Requirements installation failed with status: 100.

You have problems with your sources
heres one solution, open a terminal type in
sudo apt-get update
take note of the names that are causing the 404s, errors, etc.
then open your software center and choose sources
there pick "Other Software" (second tab)
expand that window and start disabling the repositories that cause you trouble
as you uncheck any repositories, try again
sudo apt-get update
until you see no errors
make sure you don't see any errors or not found sources
afterward type in
source ~/.rvm/scripts/rvm
and
rvm requirements
and That's it...

Related

"command not found" in zsh after adding a command into /usr/local/bin

~ ll /usr/local/bin| grep vrl
-rwxrwxrwx 1 root root 31K 9月 29 09:38 vrlsubmit
➜ ~ echo $PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
➜ ~ vrlsubmit
zsh: command not found: vrlsubmit
Finally somebody helped me:
Root cause is:
I am trying to exec a 32bit command in 64bit system
Debug:
> file submit # < submit stands for the command >
submit: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux.so.2, for GNU/Linux 2.2.5, not stripped
> ls /lib | grep ld
compat-ld
gold-ld
Based on above "file submit", it tells "interpreter /lib/ld-linux.so.2" needed. But there are no /lib/ld-linux.so.2 file at all!!!
Solution:
sudo apt-get install lib32z1 -y
submit
Error: Missing one or more required arguments.
submit
Finished to resolve this issue!

Issues when installing drake in M1 macOS

I follow the steps in the webpage, a problem came out when executing./setup/mac/install_prereqs.sh
drake % ./setup/mac/install_prereqs.sh
+ binary_distribution_args=()
+ source_distribution_args=()
+ '[' '' '!=' '' ']'
+ source ./setup/mac/binary_distribution/install_prereqs.sh ''
++ set -euxo pipefail
++ with_update=1
++ '[' '' '!=' '' ']'
++ [[ 501 -eq 0 ]]
++ command -v conda
++ command -v brew
++ [[ -z '' ]]
++ export HOMEBREW_NO_AUTO_UPDATE=1
++ HOMEBREW_NO_AUTO_UPDATE=1
++ export HOMEBREW_NO_INSTALL_CLEANUP=1
++ HOMEBREW_NO_INSTALL_CLEANUP=1
++ binary_distribution_called_update=0
++ [[ 1 -eq 1 ]]
++ brew update
Already up-to-date.
++ binary_distribution_called_update=1
++ brew tap robotlocomotion/director
+++ cat
++ brew uninstall --force robotlocomotion/director/scipy#1.5.4 robotlocomotion/director/numpy#1.19.4
++ brew bundle --file=./setup/mac/binary_distribution/Brewfile --no-lock
Using dreal-deps/ibex
Using robotlocomotion/director
Using adoptopenjdk
Using clp
Using cmake
Using double-conversion
==> Installing ibex#2.7.4 from dreal-deps/ibex
==> Downloading https://github.com/dreal-deps/ibex-lib/archive/ibex-2.7.4_10.tar.gz
Already downloaded: /Users/marui/Library/Caches/Homebrew/downloads/cf1b94f6783b4d23cc0bd34c10833f34cea5e7cff82ddfa24d7613f439a9d7f2--ibex-lib-ibex-2.7.4_10.tar.gz
==> ./waf configure --prefix=/opt/homebrew/Cellar/ibex#2.7.4/2.7.4_10 --enable-shared --with-optim --with-solver --with-affine-extended --interval-lib=filib --lp-lib=clp --clp-path=/opt/homebrew/opt/clp
Last 15 lines from /Users/marui/Library/Logs/Homebrew/ibex#2.7.4/01.waf:
Checking for program 'make' : /opt/homebrew/Library/Homebrew/shims/mac/super/make
Applying patch : filibsrc-3.0.2.2.all.all.patch
Calling configure : done
Calling make : done
Calling install : done
Checking for header interval/interval.hpp : yes
Checking for library prim : yes
Checking for compiler flags -frounding-math : yes
Checking for compiler flags -ffloat-store : yes
Checking for header interval/interval.hpp with -msse3 : yes
Configuration of the library for LP
Library for LP : clp
Checking for 'clp' : not found
The configuration failed
(complete log in /private/tmp/ibex-2.7.4-20210319-75719-hq0bkg/ibex-lib-ibex-2.7.4_10/__build__/config.log)
Do not report this issue to Homebrew/brew or Homebrew/core!
Installing dreal-deps/ibex/ibex#2.7.4 has failed!
Using eigen
Using gcc
Using fmt
Using gflags
Using glew
Using glib
Using graphviz
Using ipopt
Using libyaml
Using lz4
Using nlopt
Using numpy
Using openblas
Using pkg-config
Using python#3.9
Using scipy
Using spdlog
Using suite-sparse
Using tinyxml
Using tinyxml2
Using robotlocomotion/director/vtk#8.2.0
Using xz
Using yaml-cpp
Using zeromq
Homebrew Bundle failed! 1 Brewfile dependency failed to install.
How can i fix this? Thanks in advance.
The official answer: "On macOS, x86_64 is the only supported architecture and running Drake under Rosetta 2 emulation on arm64 is not supported." -- https://drake.mit.edu/developers.html#supported-configurations as of 2021-03-18.
You can subscribe to https://github.com/RobotLocomotion/drake/issues/14555 for any updates regarding M1 support.
However, if you want to try to hack through it locally, you could try commenting out homebrew dependencies that do not succeed (e.g., IBEX in this case).
With IBEX disabled, you'll also have to bazel build --define=NO_DREAL=ON to disable dReal for the moment. Likely, other dependencies will also fail, but we have not tested on M1 yet so we don't know how close it is to working.
I've filed https://github.com/dreal/homebrew-dreal/issues/10 in case we can fix the IBEX problem easily.
The other option would be to spin up an Ubuntu VM (based on either 18.04 or 20.04).

Build HDFView 3.1 on ubuntu-20.04

I have downloaded the deb file from the https://support.hdfgroup.org/ftp/HDF5/releases/HDF-JAVA/hdfview-3.1.2/bin/ link and install it via
sudo dpkg -i hdfview_3.1.2-1_amd64.deb
I didn't see any error during installation.
But hdfview didn't open.
I am using java-1.11.0-openjdk and hdf5-1.10.
How to solve this problem?
I found a way to solve this. The program gets installed in /opt/hdfview. However, starting it causes the error
$ ./bin/HDFView
Error: dl failure on line 534
Error: failed /opt/hdfview/lib/runtime/lib/server/libjvm.so, because /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.32' not found (required by /opt/hdfview/lib/runtime/lib/server/libjvm.so)
Failed to launch JVM
We can fix this by patching the libjvm.so file:
Install java-15 if it is not present already:
sudo apt install openjdk-15-jre
Find the libjvm.so file:
cd /usr/lib
find . -name libjvm.so
In my case, the correct version is located in /usr/lib/jvm/java-15-openjdk-amd64/lib/server/libjvm.so
Replace the libjvm.so in hdfview with a symlink to this libjvm.so
cd /opt/hdfview/lib/runtime/lib/server
sudo mv libjvm.so libjvm.so.bak
sudo ln -s /usr/lib/jvm/java-15-openjdk-amd64/lib/server/libjvm.so libjvm.so
(optional) link the hdfview binary, so that it is found in the terminal
sudo ln -s /opt/hdfview/bin/HDFView /usr/local/bin/hdfview
Afterwards, you should be able to start hdfview both from the terminal and the icon.

RVM Ruby Installation Fail on OS X 10.9.3?

I am receiving an error when running the RVM command to install Ruby on my OSX machine. The output is below:
ThisComp:~ *************$ \curl -L https://get.rvm.io | bash -s stable --ruby
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 184 100 184 0 0 330 0 --:--:-- --:--:-- --:--:-- 330
100 20511 100 20511 0 0 18860 0 0:00:01 0:00:01 --:--:-- 9.7M
Downloading https://github.com/wayneeseguin/rvm/archive/stable.tar.gz
Upgrading the RVM installation in /Users/************/.rvm/
RVM PATH line found in /Users/*************/.profile /Users/*************/.bashrc /Users/***********/.zshrc.
RVM sourcing line found in /Users/*********/.bash_profile /Users/**********/.zlogin.
Upgrade of RVM in /Users/*************/.rvm/ is complete.
# msutyak,
#
# Thank you for using RVM!
# We sincerely hope that RVM helps to make your life easier and more enjoyable!!!
#
# ~Wayne, Michal & team.
In case of problems: http://rvm.io/help and https://twitter.com/rvm_io
Upgrade Notes:
* WARNING: You have '~/.profile' file, you might want to load it,
to do that add the following line to '/Users/*************/.bash_profile':
source ~/.profile
* No new notes to display.
rvm 1.25.26 (stable) by Wayne E. Seguin <wayneeseguin#gmail.com>, Michal Papis <mpapis#gmail.com> [https://rvm.io/]
Searching for binary rubies, this might take some time.
Found remote file https://rubies.travis-ci.org/osx/10.9/x86_64/ruby-2.1.2.tar.bz2
Checking requirements for osx.
Installing requirements for osx.
Updating system......
Installing required packages: automake...
Error running 'requirements_osx_brew_libs_install automake',
showing last 15 lines of /Users/***************/.rvm/log/1401388968_ruby-2.1.2/package_install_automake.log
++ /scripts/functions/logging : rvm_pretty_print() 81 > case "$1" in
++ /scripts/functions/logging : rvm_pretty_print() 82 > [[ -t 1 ]]
++ /scripts/functions/logging : rvm_pretty_print() 82 > return 1
++ /scripts/functions/logging : rvm_warn() 139 > printf %b 'There were package installation errors, make sure to read the log.
Try `brew tap --repair` and make sure `brew doctor` looks reasonable.
Check Homebrew requirements https://github.com/mxcl/homebrew/wiki/Installation\n'
There were package installation errors, make sure to read the log.
Try `brew tap --repair` and make sure `brew doctor` looks reasonable.
Check Homebrew requirements https://github.com/mxcl/homebrew/wiki/Installation
++ /scripts/functions/requirements/osx_brew : requirements_osx_brew_libs_install() 63 > case "$_system_version" in
++ /scripts/functions/requirements/osx_brew : requirements_osx_brew_libs_install() 70 > return 1
Requirements installation failed with status: 1.
When I type brew tap --repair, I receive the following error:
Pruned 0 dead formulae
Does anyone know what is going on and what I can do to rectify the situation? I'm not sure why there are package installation errors.
EDIT:
ThisMachine:~ ************$ brew link --overwrite --dry-run autoconf
Would remove:
/usr/local/bin/ifnames
/usr/local/bin/autoupdate
/usr/local/bin/autoscan
/usr/local/bin/autoreconf
/usr/local/bin/autom4te
/usr/local/bin/autoheader
/usr/local/bin/autoconf
/usr/local/share/man/man1/ifnames.1
/usr/local/share/man/man1/config.sub.1
/usr/local/share/man/man1/config.guess.1
/usr/local/share/man/man1/autoupdate.1
/usr/local/share/man/man1/autoscan.1
/usr/local/share/man/man1/autoreconf.1
/usr/local/share/man/man1/autom4te.1
/usr/local/share/man/man1/autoheader.1
/usr/local/share/man/man1/autoconf.1
/usr/local/share/emacs/site-lisp/autotest-mode.elc
/usr/local/share/emacs/site-lisp/autotest-mode.el
/usr/local/share/emacs/site-lisp/autoconf-mode.elc
/usr/local/share/emacs/site-lisp/autoconf-mode.el
/usr/local/share/autoconf/m4sugar/version.m4
/usr/local/share/autoconf/m4sugar/m4sugar.m4f
/usr/local/share/autoconf/m4sugar/m4sugar.m4
/usr/local/share/autoconf/m4sugar/m4sh.m4f
/usr/local/share/autoconf/m4sugar/m4sh.m4
/usr/local/share/autoconf/m4sugar/foreach.m4
/usr/local/share/autoconf/INSTALL
/usr/local/share/autoconf/autotest/specific.m4
/usr/local/share/autoconf/autotest/general.m4
/usr/local/share/autoconf/autotest/autotest.m4f
/usr/local/share/autoconf/autotest/autotest.m4
/usr/local/share/autoconf/autoscan/autoscan.list
/usr/local/share/autoconf/autom4te.cfg
/usr/local/share/autoconf/Autom4te/XFile.pm
/usr/local/share/autoconf/Autom4te/Request.pm
/usr/local/share/autoconf/Autom4te/Getopt.pm
/usr/local/share/autoconf/Autom4te/General.pm
/usr/local/share/autoconf/Autom4te/FileUtils.pm
/usr/local/share/autoconf/Autom4te/Configure_ac.pm
/usr/local/share/autoconf/Autom4te/Channels.pm
/usr/local/share/autoconf/Autom4te/ChannelDefs.pm
/usr/local/share/autoconf/Autom4te/C4che.pm
/usr/local/share/autoconf/autoconf/types.m4
/usr/local/share/autoconf/autoconf/status.m4
/usr/local/share/autoconf/autoconf/specific.m4
/usr/local/share/autoconf/autoconf/programs.m4
/usr/local/share/autoconf/autoconf/oldnames.m4
/usr/local/share/autoconf/autoconf/libs.m4
/usr/local/share/autoconf/autoconf/lang.m4
/usr/local/share/autoconf/autoconf/headers.m4
/usr/local/share/autoconf/autoconf/go.m4
/usr/local/share/autoconf/autoconf/general.m4
/usr/local/share/autoconf/autoconf/functions.m4
/usr/local/share/autoconf/autoconf/fortran.m4
/usr/local/share/autoconf/autoconf/erlang.m4
/usr/local/share/autoconf/autoconf/c.m4
/usr/local/share/autoconf/autoconf/autoupdate.m4
/usr/local/share/autoconf/autoconf/autotest.m4
/usr/local/share/autoconf/autoconf/autoscan.m4
/usr/local/share/autoconf/autoconf/autoheader.m4
/usr/local/share/autoconf/autoconf/autoconf.m4f
/usr/local/share/autoconf/autoconf/autoconf.m4
ThisMachine:~ *************$ brew link --overwrite autoconf
Linking /usr/local/Cellar/autoconf/2.69...
Error: Could not symlink share/emacs/site-lisp/autotest-mode.elc
/usr/local/share/emacs/site-lisp is not writable.
ThisMachine:~ *************$ brew install automake
Error: You must `brew link autoconf' before automake can be installed
Running brew link autoconf:
ThisMachine:~ ************$ brew link autoconf
Linking /usr/local/Cellar/autoconf/2.69...
Error: Could not symlink share/emacs/site-lisp/autotest-mode.elc
Target /usr/local/share/emacs/site-lisp/autotest-mode.elc
already exists. You may want to remove it:
rm /usr/local/share/emacs/site-lisp/autotest-mode.elc
To force the link and overwrite all conflicting files:
brew link --overwrite autoconf
To list all files that would be deleted:
brew link --overwrite --dry-run autoconf
Installation of automake has failed. Try installing it manually using brew:
brew install automake
This post has some additional tips for installing automake in case you get other errors: Error running 'requirements_osx_brew_libs_install...' on Mac 10.7

About Ruby Version Manager Installation

I was trying to install RVM:Ruby Version Manager from:
http://rvm.beginrescueend.com/rvm/install/
I opened up my terminal in my mac os version 10.5.8 and use the command line
bash < <( curl http://rvm.beginrescueend.com/releases/rvm-install-head )
then I got the message,
"You must now finish the install manually:
1) Place the folowing line at the end of your shell's loading files(.bashrc or .bash_profile for bash and .zshrc for zsh), after all path/variable settings:
[[ -s $HOME/.rvm/scripts/rvm ]] && source $HOME/.rvm/scripts/rvm
Please note that this must only occur once - so, you only need to add it the first time you install rvm.
2) Ensure that there is no 'return' from inside the .bashrc file. (otherwise rvm will be prevented from working properly).
This means that if you see '[ -z ] && return' then you must change this line to:
if [[ ! -z ]] ; then
... original content that was below the && return line ...
fi # <= be sure to close the if.
#EOF .bashrc
Be absolutely sure to REMOVE the '&& return'.
If you wish to DRY up your config you can 'source ~/.bashrc' at the bottom of your .bash_profile.
placing all non-interactive items in the .bashrc, including the 'source' line above
3) Then CLOSE THIS SHELL and open a new one in order to use rvm.
Installation of RVM to /Users/Home/.rvm/ is complete.
kapplej-4:~ Home$ #!/usr/bin/env bash
kapplej-4:~ Home$
kapplej-4:~ Home$ # Install git
kapplej-4:~ Home$ mkdir -p $HOME/.rvm/src && cd $HOME/.rvm/src && version=1.6.5.3
kapplej-4:src Home$ curl -O http://kernel.org/pub/software/scm/git/git-$version.tar.gz
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 2645k 100 2645k 0 0 953k 0 0:00:02 0:00:02 --:--:-- 1060k
kapplej-4:src Home$ cd git-$version && ./configure --prefix=/usr/local && make && sudo make install
-bash: cd: git-1.6.5.3: No such file or directory"
I have no idea how to complete installation manually, I am a complete newbie so can someone please give me a step by step instruction on how to do this. For eg, where do I go to add those lines to the shell's loading files?
Thanks,
Not sure why you're installing git through rvm, but my guess is that you didn't extract the tar.gz file before trying to access the directory. Before cd'ing into the git directory you'll need to do
tar -zxf git-$version.tar.gz
To complete the install you need to add the line:
[[ -s $HOME/.rvm/scripts/rvm ]] && source $HOME/.rvm/scripts/rvm
to the end of your .bashrc file (assuming you're using bash which you can determine with echo $SHELL.)
You also need to verify that your bash script doesn't return (the -z return bit in the RVM message. If it does return do what RVM says during the install.)
Once the line is added exit your shell and open a new one. You should then be able to do rvm info to see rvm info and rvm to get more information on RVM.
If Git is already installed, the up-to-date command to install RVM is curl -L get.rvm.io | bash -s stable.

Resources