Install Obsolete Devtoolset Collection for CentOS - centos

At present time Devtoolset-5 (and earlier) cannot be istalled from Software Collection Repository (centos-release-scl) using yum (only Devtoolset-6 and 7 are available). Nevertheless, this collection can be downloaded as a list of rpm-packages. Is it possible to enable such EOL collections for yum, or maybe there is another way to install them correctly?

There was no DTS 5 release. It was skipped to align the DTS version with the GCC major release, once GCC switched to a yearly increasing version number.
DTS versions 3 and 4 are available from the centos-release-scl repository.

While Devtoolset-3 and 4 are located on the Centos mirror site, yum will not be able to find them as they were not included in the repodata on the site. These were probably excluded because they are EOL (end-of-life), and have dependency bugs (Bug 1410152). Try using the older Devtoolset-3 packages here, which do not have the dependency issues:
https://copr.fedorainfracloud.org/coprs/rhscl/devtoolset-3/
If you really want the packages from the centos.org site, I went with wget to download all the RPMs, then recreated a local yum repo. However, you'll see the dependency issues and yum install devtoolset-3 will fail.
$ wget -r -p -e robots=off --directory-prefix="/mnt/local-devtoolset3-repo" --recursive --no-clobber --no-parent http://mirror.centos.org/centos/6/sclo/x86_64/rh/devtoolset-3/
$ sudo yum install createrepo
$ cd /mnt/local-devtoolset3-repo
$ createrepo --database .

You can install the obsolete devtoolset-3 in this way:
sudo yum --obsolete install devtoolset-3

Related

CPP-REST-SDK in Centos 7

I have a CentOS 7 (EPEL-Repo is registered) but I do not find the package for CPP-REST (libcpprest-dev in Debian) in the repos.
Do I need to install it from vanilla or is there a package in CentOS?
Thanks!
Short answer...
There is not an "official" CentOS 7 package at this time (2018-10-03) for cpprestsdk (libcpprest-dev in Debian).
Long answer (sharing this in case it helps anyone)...
You could build cpprestsdk from source, but the instructions "How to build for Linux" (https://github.com/Microsoft/cpprestsdk/wiki/How-to-build-for-Linux) do not include CentOS or RHEL (at the time of this writing, 2018-10-03).
Before building cpprestsdk on CentOS 7, you'll need to update boost (at time of this writing CentOS 7 repos have boost 1.53, but 1.54 is required, and 1.68 is latest). You can do this to update (using boost 1.68 as example):
cd && wget https://dl.bintray.com/boostorg/release/1.68.0/source/boost_1_68_0.tar.gz
tar -xzvf boost_1_68_0.tar.gz
cd ~/boost_1_68_0
./bootstrap.sh --prefix=/opt/boost
sudo ./b2 install --prefix=/opt/boost --with=all
After updating boost, I was able to build cpprestsdk on CentOS 7 like this...
Install some needed tools/libraries:
sudo yum -y install git cmake3 openssl-devel gcc-c++ make
Download the cpprestsdk project:
git clone https://github.com/Microsoft/cpprestsdk.git casablanca
cpprestsdk wants to treat warnings as errors. I had to turn this off by commenting out this line in ~/casablanca/Release/CMakeLists.txt:
#set(WERROR ON CACHE BOOL "Treat Warnings as Errors.")
Prepare/build cpprestsdk project:
cd casablanca/Release
mkdir build.release && cd build.release
cmake3 .. -DCMAKE_BUILD_TYPE=Release -DBOOST_ROOT=/opt/boost
make
Install header files and library
sudo make install
Notice that I am calling cmake3 (not cmake) and I am specifying the boost root; which differs from the official instructions that appear to be written and tested for Ubuntu (not CentOS or RHEL). To build my projects using cpprestsdk, I had to use ldconfig to find the library paths.

yum local install to install a package with its dependency

I have downloaded a package with it's dependency and want to install a package with dependency. Even though i have download in local folder it's checking for online.
sudo yum -y --disablerepo=* localinstall autoconf-2.69-11.el7.noarch.rpm
I am trying above command but failed to load it's dependency that is there in same folder.
Thanks,
Hare
Inside the local directory where you have all the downloaded RPMs, do this:
sudo yum --disablerepo=* localinstall *.rpm
OR
sudo yum --disablerepo=* localinstall foo.rpm bar.rpm baz.rpm
Since you have downloaded all the dependencies to a single directory, you can also use rpm to install those:
sudo rpm -Uvvh *.rpm --test
--test does a dry-run. Remove it to install on disk.
Even if the solution provide by iamauser is very great (and I am using it all the time), I wish to give you an other way to do it.
It exists yum-downloader command which doing basically the same thing for you.
# yumdownloader <package> --resolve
You just have to download it first :
# yum install yum-utils
Overall, I suggest you to read this article from Red Hat company site's which details everything about those two methods :
https://access.redhat.com/solutions/10154

Error "the PGXS Makefile cannot be found" when installing PostGis on Debian

I am in the process of installing PostGis over psql on a Debian machine (actually crunchbang).
I have completed the following steps:
$ wget http://download.osgeo.org/postgis/source/postgis-2.0.3.tar.gz
$ tar xzf postgis-2.0.3.tar.gz
$ cd postgis-2.0.3
$ ./configure
On the final step I get the following error:
configure: error: the PGXS Makefile /usr/lib/postgresql/9.1/lib/pgxs/src/makefiles/pgxs.mk cannot be found. Please install the PostgreSQL server development packages and re-run configure.
The issue is that I do already have Postgres installed:
$ psql --version
psql (9.1.9)
I have checked this on two machines with the same configuration and get the same error. What am I missing here?
PostgreSQL is broken down into several packages, and having psql installed doesn't imply that the development packages are also installed.
According to the error message:
Please install the PostgreSQL server development packages and re-run
configure
you need:
# apt-get install postgresql-server-dev-9.1
Also note there's a APT pgdg repository providing recent pre-compiled versions of postgres-related packages (including postgis) that you may use instead of self-compiling.
If your system is set up to use this repository, just do:
# apt-get install postgresql-9.1-postgis-2.0
Daniel's answer works great except that it needs the following update:
$ sudo apt-get install postgresql-9.1-postgis-2.1
These packages can be updated some time in future again. So, it is recommended to search for new packages using aptitude and install the appropriate one:
$ aptitude search postgis

Setting up Mesos on CentOS

I tried to install the latest release tarball of Mesos on CentOS 6.4 with no luck. It ended up in all sorts of failures in trying to find jvm & jni bindings. Is there any instructions on how to install Mesos on RHEL or CentOS ?
I couldn't find any instructions around so I thought I would troubleshoot all through my way and thought of documenting it here so it can save your time.
First things first, load your CentOS box with essential build tools to get started
$ sudo yum groupinstall "Development tools"
Get Java and python dependencies installed
$ sudo yum install java-1.6.0-openjdk.x86_64 java-1.6.0-openjdk-devel.x86_64 python python-devel libcurl libcurl-devel
Get the latest Mesos tarball
$ wget http://mirror.nus.edu.sg/apache/mesos/0.13.0/mesos-0.13.0.tar.gz
$ tar -xzvf mesos-0.13.0.tar.gz
$ cd mesos-0.13.0
Before you can build Mesos, you need to set correct JAVA binding paths
$ export JAVA_HOME=/usr
$ export JAVA_LDFLAGS="-L/usr/lib/jvm/java-1.6.0/jre/lib/amd64/server -R/usr/lib/jvm/java-1.6.0/jre/lib/amd64/server -ljvm"
$ export JAVA_CPPFLAGS="-I/usr/lib/jvm/java-1.6.0/include -I/usr/lib/jvm/java-1.6.0/include/linux"
$ export LD_LIBRARY_PATH=/usr/lib/jvm/java-1.6.0/jre/lib/amd64/server:$LD_LIBRARY_PATH
Configure and build it
$ ./configure
$ make
After you have built Mesos, it is advisable that you build and run the tests, this will make sure that what you have installed meets all the requirements
$ make check
If the checks are successful, You are just one step away from installing it in your system installation paths
$ make install
To learn how to use Mesos , go here http://mesos.apache.org/gettingstarted/
For those who prefer installing from RPM's, here is a link to a number of different releases for different Linux flavors: http://mesosphere.io/downloads/ For example, for Centos64:
wget http://downloads.mesosphere.io/master/centos/6/mesos_0.14.2_x86_64.rpm
sudo rpm -Uvh mesos_0.14.2_x86_64.rpm
I also had to set my LD_LIBRARY_PATH, though to a slightly different value. Check yours.
Python bindings can also be downloaded from the first link above:
wget http://downloads.mesosphere.io/master/centos/6/mesos_0.14.2_x86_64.egg
sudo easy_install mesos_0.14.2_x86_64.egg

Installing LuaMongo on Ubuntu 11.10

I have researched and viewed the post to install luamongo- http://groups.google.com/group/luamongo/browse_thread/thread/1eaa56974614dc90/c91c842e241aa4de#c91c842e241aa4de
But the installation will not work. I already have mongodb-10gen version 2.0.3 and lua5.1 version 5.1.4.10 installed.
How do I download luamongo from https://github.com/moai/luamongo and install it and get it working as an import statement in a lua script to be able to write to a mongo db? Any suggestions would be helpful, nothing I have tried so far or read has been able to help. If more information is needed I will post it. Thanks in advance.
I got this script from a friend of mine which should be helpful:
# Download mongodb and driver
wget http://downloads.mongodb.org/cxx-driver/mongodb-linux-x86_64-v2.0-latest.tgz
wget http://fastdl.mongodb.org/linux/mongodb-linux-x86_64-2.0.2.tgz
# Extract each
tar xvzf mongodb-linux-x86_64-2.0.2.tgz
tar xvzf mongodb-linux-x86_64-v2.0-latest.tgz
# Add mongo bin to PATH
export PATH=$PATH:~/mongodb-linux-x86_64-2.0.2/bin
# Grab dev tools and dependencies (May need to run apt-get update to download all)
sudo apt-get -y install tcsh scons libpcre++-dev libboost-dev libreadline-dev libboost-program-options-dev libboost-thread-dev libboost-filesystem-dev libboost-date-time-dev gcc g++ git lua5.1-dev make
# Grab latest luamongo (will need to add your github ssh key)
git clone git#github.com:moai/luamongo
# Compile mongo driver
cd mongo-cxx-driver-v2.0
sudo scons install
# Install where lua can load it
sudo cp libmongoclient.* /usr/lib