rvm requirements install git error - ruby

I'm trying to install rvm with latest ruby on a centos 5 server, rvm is already installed with no ruby, it throws an error when trying to install ruby, something regarding git.
$ uname -a
Linux 2.6.18-308.24.1.el5PAE #1 SMP Tue Dec 4 18:28:32 EST 2012 i686 i686 i386 GNU/Linux
$ rvm install ruby-2.2-head
Checking requirements for centos.
Installing requirements for centos.
Installing required packages: git, autoconf.......
Error running 'requirements_centos_libs_install git autoconf',
showing last 15 lines of /home/ruby/.rvm/log/1442954643_ruby-2.2-head/package_install_git_autoconf.log
--> Missing Dependency: perl(Error) is needed by package git-1.8.2.1-1.el5.i386 (epel)
git-1.8.2.1-1.el5.i386 from epel has depsolving problems
--> Missing Dependency: perl(Term::ReadKey) is needed by package git-1.8.2.1-1.el5.i386 (epel)
git-1.8.2.1-1.el5.i386 from epel has depsolving problems
--> Missing Dependency: perl(Git) is needed by package git-1.8.2.1-1.el5.i386 (epel)
Error: Missing Dependency: perl-Git = 1.8.2.1-1.el5 is needed by package git-1.8.2.1-1.el5.i386 (epel)
Error: Missing Dependency: perl(Term::ReadKey) is needed by package git-1.8.2.1-1.el5.i386 (epel)
Error: Missing Dependency: perl(Git) is needed by package git-1.8.2.1-1.el5.i386 (epel)
Error: Missing Dependency: perl(Error) is needed by package git-1.8.2.1-1.el5.i386 (epel)
You could try using --skip-broken to work around the problem
You could try running: package-cleanup --problems
package-cleanup --dupes
rpm -Va --nofiles --nodigest
++ return 1
++ return 1
Requirements installation failed with status: 1.
$ git --version
git version 1.6.4.4
This hosts uses cpanel.
I've tried directly installing with yum, same error, tried also to remove git
# yum remove git
Failed to set locale, defaulting to C
Loaded plugins: downloadonly, fastestmirror
Setting up Remove Process
No Match for argument: git
My guess is that Cpanel has git installed, but is an outdated version, could be this?

Try the answers provided here -- https://github.com/rvm/rvm/issues/2696 -- specifically fixing whatever goes wrong when you try to do this...
yum install -y libyaml-devel autoconf gcc-c++ readline-devel zlib-devel openssl-devel

Related

Install ffmpeg in Centos 7

I am new to Centos.
When I tried to install ffmpeg in Centos, followed this link.
Error: Package: ffmpeg-2.8.15-2.el7.nux.x86_64 (nux-dextop)
Requires: libSDL-1.2.so.0()(64bit)
Error: Package: ffmpeg-libs-2.8.15-2.el7.nux.x86_64 (nux-dextop)
Requires: libschroedinger-1.0.so.0()(64bit)
Error: Package: libavdevice-2.8.15-2.el7.nux.x86_64 (nux-dextop)
Requires: libopenal.so.1()(64bit)
Error: Package: libavdevice-2.8.15-2.el7.nux.x86_64 (nux-dextop)
Requires: libSDL-1.2.so.0()(64bit)
Error: Package: ffmpeg-libs-2.8.15-2.el7.nux.x86_64 (nux-dextop)
Requires: libass.so.5()(64bit)
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest
When I tried to install libSDL-1.2.so.0, I have another dependencies errors.
What is usual practice of installation in Centos?
I go to Centos repository and download rpm binary package.
Then use the command as follow.
sudo yum --nogpgcheck localinstall xxxxxxxxxxx.rpm
If there are dependency packages to install, I tried to install those dependencies first.
We need to install epel repository first for Centos 7.
https://www.cyberciti.biz/faq/installing-rhel-epel-repo-on-centos-redhat-7-x/
Then install from epel repository using yum install command.

Installing GoCD Agent with Yum fails with `sysvinit-tools` not found

I'm' trying to install GoCD Agent with sudo yum install -y go-agent
However, I'm getting the following error.
Resolving Dependencies
--> Running transaction check
---> Package go-agent.noarch 0:19.6.0-9515 will be installed
--> Processing Dependency: sysvinit-tools for package: go-agent-19.6.0-9515.noarch
--> Finished Dependency Resolution
Error: Package: go-agent-19.6.0-9515.noarch (gocd)
Requires: sysvinit-tools
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest
I tried installing sysvinit-tools with sudo yum install sysvinit-tools
I'm getting the following error.
Loaded plugins: priorities, update-motd, upgrade-helper
amzn-main | 2.1 kB 00:00:00
amzn-updates | 2.5 kB 00:00:00
No package sysvinit-tools available.
Error: Nothing to do
I'm on Amazon Linux AMI
In your case you appear to be on Amazon Linux AMI 2018.03 which is rather old and does not have sysvinit-tools.
I would recommend upgrading your machine, and to avoid upgrading sysvinit manually.
for centos7:
you can find that package in the epel repositories
First add the epel repository:
yum install epel-release
now you will be able to install sysvinit-tools:
yum install sysvinit-tools

Installing ocaml-top on OSX - GTK issue

I am trying to install ocaml-top on macOS High Sierra 10.13. I have installed homebrew (using the command given at https://brew.sh/) and done:
brew install opam
opam init
and answered Y to "Do you want Opam to modify ~/.bash_profile and ~/.ocamlinit". Then:
eval `opam config env`
opam install ocaml-top
I get the following error
The following actions failed
∗ install conf-gtksourceview 2
No changes have been performed
=-=- conf-gtksourceview.2 troobleshooting -=-=-=-=-
=> This package relies on external (system) dependencies that may be
missing.
`opam depext conf-gtksourceview.2' may help you find the correct
installation for your system.
[EDIT: trying on a second mac computer, the error is "[ERROR] The compilation of conf-gtksourceview failed at "pkg-config gtksourceview-2.0"."]
The above depext command gives:
# The following system packages are needed:
# - gtksourceview
# - libxml2
# All required OS packages found.
I have found advice (e.g. https://github.com/OCamlPro/ocaml-top/issues/46) like: "If you installed gtk+ through brew, you may need to do 'export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig' (homebrew)". However typing either that or "export PKG_CONFIG_PATH=/opt/X11/lib/pkgconfig" in the terminal and retrying does not help.
I do not know anything about any of this, but it looked libgtksourceview2.0-dev might be involved, so I tried
opam install libgtksourceview2.0-dev
but
[ERROR] No package named libgtksourceview2 found.
Likewise "brew install libgtksourceview2.0-dev" or "brew install libgtksourceview".
https://github.com/ocaml/opam-repository/issues/8449 seems to imply this error could be because other packages need to be upgraded, and mentions that "the expanded pkg-config --short-errors --print-errors "gtksourceview-2.0 >= 2.2.0" [...] does print more information". I have no idea what this means though and how to detect which packages need to be upgraded.
You could try
brew install pkg-config gtksourceview libxml2
Otherwise, running brew search <part-of-name-of-dep> may help to find the required dependencies.

update-alternatives: error: alternative path /usr/bin/gem1.8 doesn't exist

I am trying to install ruby1.8 on Ubuntu 14.04 so that I can be able to run a work application. When i run this command:
sudo apt-get install build-essential ruby1.8-dev ruby-dev mysql-client mysql-server git-core libmysql-ruby libmysqlclient-dev unzip rubygems
I get these errors below:
Building dependency tree Reading state information...
Done build-essential is already the newest version. git-core
is already the newest version. ruby-dev is already the newest
version. unzip is already the newest version.
libmysqlclient-dev is already the newest version. mysql-client is
already the newest version. mysql-server is already the newest
version. ruby1.8-dev is already the newest version. rubygems
is already the newest version. libmysql-ruby1.8 is already the
newest version. 0 upgraded, 0 newly installed, 0 to remove and 161
not upgraded. 1 not fully installed or removed. After this
operation, 0 B of additional disk space will be used. Do you want
to continue? [Y/n] y Setting up rubygems (1.8.25-1bbox3~trusty1)
... update-alternatives: error: alternative path /usr/bin/gem1.8
doesn't exist dpkg: error processing package rubygems
(--configure): subprocess installed post-installation script
returned error exit status 2 Errors were encountered while
processing: rubygems E: Sub-process /usr/bin/dpkg returned an
error code (1) lusekero_mwathengere#lusekero:~$
Please help....I know ruby1.8 is an old version but this is what we are using at work so I need to succeed in this installation.
Thanks, in advance, for any help rendered.
I ran into a similar error message while putting ruby on rails on AWS:
Setting up rubygems (1.8.25-1bbox3~trusty1) ...
update-alternatives: error: alternative path /usr/bin/gem1.8 doesn't exist
dpkg: error processing package rubygems (--configure):
subprocess installed post-installation script returned error exit status 2
Errors were encountered while processing:
rubygems
E: Sub-process /usr/bin/dpkg returned an error code (1)
The solution was to manually install the library for the missing alternative path. in ubuntu:
sudo apt-get install rubygems1.8
This allowed my install script to find the requested files.
This worked for me:
sudo apt-get install rubygems1.8
update-alternatives --set ruby /usr/bin/ruby1.8

Unable to resolve Ruby error (missing psych)

Whenever I run something with Ruby on my server, I get the following error:
/usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/yaml.rb:56:in `<top (required)>':
It seems your ruby installation is missing psych (for YAML output).
To eliminate this warning, please install libyaml and reinstall your ruby.
I installed Ruby using RVM onto my VPS.
I’ve tried installing the package libyaml as per instructed in other issues on Stack Overflow, to no avail.
I’m not sure what type of system my VPS is running, but it doesn’t have the apt-get command. It does have yum…
I have to disagree with #JunaidKirkire in that I think you are running CentOS or Redhat 5 which uses a a very old version of Ruby by default and I think using RVM is a much better way to go. I believe you will just need to compile libyaml from source with the following:
rvm pkg install libyaml
This will tell you the directory that it is compiling into, in my case, it is /Users/ehowe/.rvm/usr
You then need to recompile Ruby with the following option:
rvm reinstall 1.9.3 --with-libyaml-dir=$directory_that_rvm_installed_libyaml_to
So in my case, I would do:
rvm install 1.9.3 --with-libyaml-dir=/Users/ehowe/.rvm/usr
If you are running rvm as root, this will get installed into /usr/local/rvm/usr. If you are running it as a user, as is recommended, it would be /home/$user/.rvm/usr
I had this problem and installing libyaml didn't help. It turned out that libyaml-devel was needed by psych. I was on centos6 so I did this:
curl -O http://www6.atomicorp.com/channels/atomic/centos/6/x86_64/RPMS/atomic-release-1.0-14.el6.art.noarch.rpm
sudo rpm -Uvh atomic-release-1.0-14.el6.art.noarch.rpm
sudo yum install libyaml-devel
rvm reinstall 1.9.3-p194
On a RHEL based distro such as CentOS 6.x you need to add another yum repository such as EPEL which contain the libyaml-devel package.
Keys for EPEL or download
RPM for EPEL
More info:
CentOS - Additional Resources
Fedora Project: EPEL Howto
Would also suggest the use of yum-plugin-priorities
Add EPEL Yum Repository
rpm --import http://dl.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-6
rpm -Kih http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
Install libyaml-devel via yum
yum -y install libyaml-devel
Packages
Dependencies Resolved
====================================================================================
Package Arch Version Repository Size
====================================================================================
Installing:
libyaml-devel x86_64 0.1.3-1.el6 epel 84 k
Installing for dependencies:
libyaml x86_64 0.1.3-1.el6 epel 52 k
Transaction Summary
====================================================================================
Install 2 Package(s)
The problem could be solved by installing libyaml. Below are the corresponding packages for the most popular distributions:
Fedora libyaml
Ubuntu and other Debian based libyaml-dev
Some other like CentOS libyaml-devel
and also you should install the following to avoid similar problems in future:
ruby-devel libxml2 libxml2-devel libxslt libxslt-devel
In case people still hit this, I fixed it using the new autolibs feature in RVM, which automatically installs dependencies using your homebrew libraries (check out rvm help autolibs for info.)
rvm reinstall 1.9.3 --autolibs=2
You seem to be working on Fedora. Check the official Ruby website for instructions on installing on Fedora.
Try this link too http://sraji.wordpress.com/2011/01/25/how-to-install-ruby-on-fedora-14/
I had this same libyaml issue with CentOS 6.2
Doing...
rvm pkg install libyaml
rvm reinstall 1.9.3 --with-libyaml-dir=/usr/local/rvm/usr
Fixed it for me.
(thanks to #Eugene)
Make sure your Redhat machine has a valid subscription:
# subscription-manager list
+-------------------------------------------+
Installed Product Status
+-------------------------------------------+
Product Name: Red Hat Enterprise Linux Server
Product ID: 69
Version: 7.1
Arch: x86_64
Status: Subscribed
Status Details:
Starts: 06/13/2014
Ends: 06/12/2015
Status must say "Subscribed". If not, then suffer through getting a login and maybe purchasing a subscription at https://access.redhat.com/management/consumers.
When that's done, run
# subscription-manager repos --enable rhel-7-server-optional-rpms
then libyaml-devel will install OK.

Resources