Why couldn't the latest version of rsync be installed on CentOS 7.2? - linux

I am using CentOS 7.2.
I would like to install the latest version of rsync - rsync-3.1.2,
rsync-3.0.9 is on system, installed when installing mariadb with yum,
# rpm -qa |grep rsync
rsync-3.0.9-17.el7.x86_64
removing rsync-3.0.9 first,
# yum remove rsync
rsync and mariadb were removed together,
then,
installing rsync-3.1.2 from source code,
# wget https://download.samba.org/pub/rsync/src/rsync-3.1.2.tar.gz
# tar -zxvf rsync-3.1.2.tar.gz
# cd rsync-3.1.2
# ./configure
# make
# make install
then,
installing mariadb with yum again,
but rsync-3.0.9 will still be installed.
How can I solve the problem?

You can install rsync 3.1.2 from the Fedora 24 .rpm package:
wget http://dl.fedoraproject.org/pub/fedora/linux/releases/24/Everything/x86_64/os/Packages/r/rsync-3.1.2-2.fc24.x86_64.rpm
rpm -Uvh rsync-3.1.2-2.fc24.x86_64.rpm
(but that question doesn't really belong to stackoverflow)

You can install rsync 3.1.2 from the gf-plus repo. Just follow the steps below:
Install the gf-release package.
sudo rpm -Uvh http://mirror.ghettoforge.org/distributions/gf/el/7/gf/x86_64/gf-release-7-10.gf.el7.noarch.rpm
Upgrade rsync package from the gf-plus repo.
sudo yum install -y --enablerepo=gf-plus rsync
Check rsync version.
hash -r; rsync --version | awk 'NR==1 {print $3}'
If it prints 3.1.2, rsync is upgraded.
By default, only the gf repo is enabled, which claims that it "won't overwrite core distro packages". You can disable it:
sudo yum-config-manager --disable gf
(For command not found error, run sudo yum install -y yum-utils and try again.)
Or simply remove all the gf* repos by removing the gf-release package:
sudo yum remove -y gf-release

You either need to install all of your software using packages, or install all of your software from source. Trying to mix and match is going to lead to exactly the sort of problem you are experiencing here: the mariadb package has a dependency on rsync, but the package manager doesn't know anything about the files you have installed from source.
The correct way to solve this problem is to build your own rsync package that can then be installed with yum. You can start with the source package for your distribution and then modify it for 3.1.2. You may be able to utilize a more recent package (e.g., from Fedora) and rebuild it for your system.
You can find the source RPM for rsync-3.0.9 here, and there is some documentation that will hopefully help you get started here.

Related

DNF fails to synchronize cache when using --installroot option

I am trying to install a bunch of software in a dummy root, so I can copy it into new systems quickly. However whenever I use dnf install or dnf builddep with the --installroot option it fails to synchronize cache for repositories.
I thought it's missing some configuration, so I copied yum and dnf configuration files into the installroot dir:
cp /etc/dnf/dnf.conf /path/to/root_fs/etc/dnf
cp /etc/yum.conf /path/to/root_fs/etc/
cp -R /etc/yum.repos.d/ /path/to/root_fs/etc/
But still what I get is
sudo dnf -c $ROOT_FS_DIR/etc/dnf/dnf.conf install gcc --installroot=$ROOT_FS_DIR -releasever=23
Error: Failed to synchronize cache for repo 'updates'
Dnf works fine updating my host system.
So how do I configure dnf to install packages into a different root dir.
DNF is not so clever and needs a releasever if you installs in chroots (bug). You miss single - in front of that option:
sudo dnf -c $ROOT_FS_DIR/etc/dnf/dnf.conf install gcc \
--installroot=$ROOT_FS_DIR --releasever=23
but the release 23 is already EOL so the mirrors do not have to exist anymore. You should use supported release version.

How can I install a recent version of GDAL on Amazon Linux?

I'd like to install GDAL on an EC2 instance running Amazon Linux (which I think is based on RHEL 6). I'd like to avoid compiling from source if possible.
The version of GDAL included in the EPEL Yum repository is too old for my purposes (gdal-1.7.3-15.el6.x86_64). EPEL 7 includes gdal-1.11.4-1.el7.x86_64 which would be perfect. Is there any way I could use this repo on Amazon Linux?
So far I've also tried:
Adding GDAL from the ELGIS 6 repo (which has version 1.9.2). However this failed to install – as found / by others. The ELGIS Wiki advises people to use EPEL now anyway.
Downloading and installing the more recent GDAL RPM from EPEL 7, but it fails due to mismatches between GDAL's dependencies and the available packages in my enabled repos.
I'm not at all experienced with Amazon Linux (or Yum) so any hints much appreciated.
This worked for me.
sudo yum -y update
sudo yum-config-manager --enable epel
sudo yum -y install make automake gcc gcc-c++ libcurl-devel proj-devel geos-devel
cd /tmp
curl -L http://download.osgeo.org/gdal/2.0.0/gdal-2.0.0.tar.gz | tar zxf -
cd gdal-2.0.0/
./configure --prefix=/usr/local --without-python
make -j4
sudo make install
cd /usr/local
tar zcvf ~/gdal-2.0.0-amz1.tar.gz *
From https://gist.github.com/mojodna/2f596ca2fca48f08438e
I faced the same problem. It is quite a bit challenging to install with yum.
Required packages
Using yum, you can install GDAL's required packages:
cpp
sqlite3
libtiff
cmake3
like so:
sudo yum install cpp.x86_64 sqlite-devel.x86_64 libtiff.x86_64 cmake3.x86_64
PROJ and GDAL
These two have to be installed from source (tarball) and they also depend on the build you want.
As for me, I was able to install GDAL 3.2.1 on Amazon Linux 2. I also have not tried installing it on an Amazon Linux 1 so it may or may not differ.

Install nodejs 4 on redhat

Nodejs version 4 has been released and installed on my windows machine.
I'm trying to install the package trough yum on redhat but i'm not getting the latest version.
i tried: sudo yum install -y nodejs but the lastest 4.0 version is not installed.
How do i install nodejs 4.0 on a redhat machine?
NodeJS 4.X for EL7 repos located at https://rpm.nodesource.com/pub_4.x/el/7/
To install with yum change baseurl in nodesource-el.repo file to:
baseurl=https://rpm.nodesource.com/pub_4.x/el/7/$basearch
/etc/yum.repos.d/nodesource-el.repo content:
[nodesource]
name=Node.js Packages for Enterprise Linux 7 - $basearch
baseurl=https://rpm.nodesource.com/pub_4.x/el/7/$basearch
failovermethod=priority
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/NODESOURCE-GPG-SIGNING-KEY-EL
[nodesource-source]
name=Node.js for Enterprise Linux 7 - $basearch - Source
baseurl=https://rpm.nodesource.com/pub_4.x/el/7/SRPMS
failovermethod=priority
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/NODESOURCE-GPG-SIGNING-KEY-EL
gpgcheck=1
You can compile and install from its source.
ver=4.0.0
wget -c https://nodejs.org/dist/v$ver/node-v$ver.tar.gz #This is to download the source code.
tar -xzf node-v$ver.tar.gz
cd node-v$ver
./configure && make && sudo make install
https://github.com/nodejs/node-v0.x-archive/wiki/Installation
Try npm install n -g and then n latest for downloading it with this version manager.
Edit:
The official distributions are managed by Nodesource. For RHEL the setup is supposed to be (take from the repo):
Current instructions for installing, as listed on the Node.js Wiki:
Note that the Node.js packages for EL 5 (RHEL5 and CentOS 5) depend on the EPEL repository being available. The setup script will check and provide instructions if it is not installed.
Run as root on RHEL, CentOS, CloudLinux or Fedora:
curl -sL https://rpm.nodesource.com/setup | bash -
Then install, as root:
yum install -y nodejs
But be aware that 4.0 is currently not in their rpm distribution
This was my solution and it worked:
Distrubution url: Distr: https://nodejs.org/dist/v4.2.1/node-v4.2.1.tar.gz (v4.2.1 for now)
Unpack the package (tar Jxf node-v4.2.1.tar.xz).
Some package could be too old and will cause problems during installation.
cd to the unpacked file and run ”./configure”. if the warming “C++ compiler too old, need g++ 4.8 or clang++ 3.4” is displayed you need to execute the following commands:
curl http://linuxsoft.cern.ch/cern/scl/slc6-scl.repo > /etc/yum.repos.d/slc6-scl.repo
rpm --import http://ftp.mirrorservice.org/sites/ftp.scientificlinux.org/linux/scientific/51/i386/RPM-GPG-KEYs/RPM-GPG-KEY-cern
yum install -y devtoolset-3
And to utilize it without having to set environment variables execute this command:
scl enable devtoolset-3 bash
Now restart the process:
./configure
make
make install
You can try this solution.
First, update software repository to the latest versions:
yum -y update
Intall "Development Tools". It's a group of tools for compiling software from sources.
yum -y groupinstall "Development Tools"
Move to /usr/src directory - the usual place to hold software sources.
cd /usr/src
Now, we pick the latest compressed source archive from Node.js website at http://nodejs.org/download/.
wget http://nodejs.org/dist/v4.2.4/node-v4.2.4.tar.gz
tar zxf node-v4.2.4.tar.gz
cd node-v4.2.4
./configure
make
make install

xz compression install on centos

Any installation or update using yum command I ended up error: Error: xz compression not available. On website I read that Python library is missing. When you try to install a library (sudo yum update pyliblzma) again failed with error. Do not know how? Thanks.
This problem comes if you installed a wrong epel release on your machine. If so, then you need to remove the epel release by
yum remove epel-release
Sometimes that is not enough, you need to remove the cache as well by:
rm -rf /var/cache/yum/x86_64/6/epel
Then you can install the epel-release again
yum -y install epel-release
You need install the EPEL repository by downloading the appropriate RPM package for your system and installing it. For example, for CentOS and Red Hat Enterprise Linux 6.x:
wget http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
sudo rpm -Uvh epel-release-6*.rpm
If you get a File Not Found error message when trying to download the package, the version number might have changed. You can access the latest version of the RPM installer from the Fedora EPEL wiki page. The wiki page also includes additional instructions for Red Hat Network subscribers who are installing the EPEL repository.
Finally, install the Python library:
yum install pyliblzma
This works perfecly in my CentOS 6.x.
I've found a solution on this page of stackexchange, working in CentOS 6.X:
https://unix.stackexchange.com/a/314756
sudo rpm -e epel-release-7-5.noarch
wget http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
sudo rpm -ivh epel-release-6-8.noarch.rpm
sudo yum clean all
sudo rpmdb -v --rebuilddb
sudo yum -y install libselinux-python
I was also suffering from this issue..
If you are installing packages but it is already available on your system.
Remove existing packages and then try to install new.
It will work properly...
I was able to solve this problem by installing pyliblzma using rpm instead of yum as yum is not working.
Find pyliblzma rpm package according to your architecture and install it using the command.
rpm -Uvh pyliblzma-version-release.architecture.rpm
I used the following command to install pyliblzma for my 64 bit Redhat 6.8 machine. Please check URL in the command and make changes accordingly.
rpm -Uvh http://dl.fedoraproject.org/pub/epel/6/x86_64/pyliblzma-0.5.3-3.el6.x86_64.rpm
In my case the issue was caused by missing modules in python's site-packages directory. Here's what I did:
$ rpm -Va
to get a list of all files belonging to all rpms that do not verify. I got a bunch of messages about missing modules:
missing /usr/lib64/python2.7/site-packages/...
Luckily, I had an identical CentOS version elsewhere with all these packages present, so I just copied them over and ran
$ rpmdb -v --rebuilddb
to rebuild rpm database.

Boost Installation

I have a question regarding the installation of the boost libraries. Is there a package that I can use the sudo apt-get install to install this package. I searched all of the questions in this forum and using the commands sudo apt-get install libboost1.40-dev I cannot install theh package with this. Also, I can download it from boost.org but I do not know the correct path to install it too. I would prefer to install it using the sudo apt-get install commands if possible. I am using Ubuntu 9.04.
Thanks.
If you want to run with the latest version, you can do the bjam install as mentioned by Ralf, but I suggest you build a 'pseudo' package so you can
uninstall it safely
prevent/notice conflicts with official/existing boost packages.
Here is how to do that:
mkdir -pv /tmp/boostinst
cd /tmp/boostinst/
wget -c 'http://sourceforge.net/projects/boost/files/boost/1.66.0/boost_1_66_0.tar.bz2/download'
tar xf download
cd boost_1_66_0/
./bootstrap.sh --help
./bootstrap.sh --show-libraries
./bootstrap.sh
checkinstall ./b2 install
On new boost version there is other way:
sudo apt-get update
wget -c 'http://sourceforge.net/projects/boost/files/boost/1.50.0/boost_1_50_0.tar.bz2/download'
tar xf download
cd boost_1_50_0
./bootstrap.sh
./b2 install
You can use command aptitude search libboost to see list of the availiable boost libraries. The last version of boost is 1.42 - maybe that's why you can't find version 1.40.
If aptitude search command don't give you sufficient results, try sudo aptitude update and then run aptitude search again.
On my version of Ubuntu (10.04) it's libboost1.40-all-dev
On your version you've probably got an older version of boost, you should just be able to tab-complete to see which version you can install.
In any case what I usually do under Ubuntu is
sudo apt-get install bjam
Extract the downloaded boost archive to your hard-drive and then cd into the root and
sudo bjam install
This way you can get the newest version of boost, and not the slightly outdated one that is available for your Ubuntu version.
This is a link which explain step by step on how to install it (give it some time read!)
http://www.boost.org/doc/libs/1_41_0/more/getting_started/unix-variants.html
but your inline shell command might be the simple and easy way for doing it

Resources