Debian Stretch and Jessie 32-bit libraries - c++

For those looking for the answer, there it's, as it's not clear on other websites.
This is required at least by the Intel compiler. Maybe it helps also for other software.

Just run those commands in your terminal.
sudo dpkg --add-architecture i386
sudo apt-get update
sudo apt-get install build-essential gcc-multilib rpm libstdc++6:i386 libgcc1:i386 zlib1g:i386 libncurses5:i386
Or as root remove the "sudo" from them.

Related

How can i download and install llvm on Ubuntu 18.04?

I have llvm-6.0 and i=I don't know how to download and install llvm-7.0 on Ubuntu 18.04? Can I install it from terminal or I download from a site?
There are basically two ways to install LLVM on your Ubuntu 18.04 machine:
Source
Binary
Considering your question, it seems you would like to have a binary version of LLVM. Therefore you can install LLVM from your Ubuntu 18.04 terminal as following:
First of all, you should update packages as following:
sudo apt-get update
However, for custom LLVM i.e. in your case LLVM 7:
sudo apt-get install -y llvm-7
sudo apt-get install -y llvm-7 llvm-7-dev llvm-7-tools clang-7
Do you want some LLVM-7 examples?
sudo apt-get -y install llvm-7-examples
Do you want to remove LLVM-6?
sudo apt-get purge llvm-6.0 clang-6.0
sudo add-apt-repository --remove ppa:kxstudio-team/builds
For default LLVM installation you should run following (not for your case):
sudo apt install llvm
For detail packages please check LLVM Ubuntu nightly packages
However, currently the last version of LLVM is LLVM 13.0. 1. It is better to install the latest version.

Install redis-cli only on CentOS

How can I install redis-cli only on CentOS, I know how to do it on ubuntu "sudo apt-get install redis-tools" but looking for similar package for CentOS.
If you are using amzn linux 2:
sudo amazon-linux-extras install epel -y
sudo yum update
sudo yum install redis
I am familiar with this approach:
wget http://download.redis.io/redis-stable.tar.gz
tar xvzf redis-stable.tar.gz
cd redis-stable
make
cp src/redis-cli /usr/local/bin/
chmod 755 /usr/local/bin/redis-cli
as you can see above, here you have to compile the source code using make. You hence need to make sure that you have c compiler on your OS. If you do not, then this can help you:
sudo yum install gcc
Also be aware, that this approach will also create another executables in src/ folder. I recommend you to check this out here.
hope it helped, have a nice day!

Unable to install boost ubuntu 13.10

I'm trying to install boost onto my 32 bit Ubuntu 13.10 system. However, when I run:
sudo apt-get install libboost-all-dev
I get:
The following packages have unmet dependencies.
libboost-all-dev : Depends: libboost-graph-parallel-dev but it is not going to be installed
Depends: libboost-mpi-dev but it is not going to be installed
Depends: libboost-mpi-python-dev but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
To try to get around this, I've done:
sudo apt-get remove --purge libboost-all-dev
But it always comes back with
Package 'libboost-all-dev' is not installed, so not removed
The following packages were automatically installed and are no longer required:
binutils-dev cmake cmake-data comerr-dev expect grive krb5-multidev
libboost-filesystem-dev libboost-program-options-dev libboost-test-dev
libcurl4-openssl-dev libexpat1-dev libgcrypt11-dev libgnutls-dev
libgnutlsxx27 libgpg-error-dev libgssrpc4 libidn11-dev libjson-c-dev
libjson0-dev libkadm5clnt-mit8 libkadm5srv-mit8 libkdb5-6 libkrb5-dev
libldap2-dev libp11-kit-dev librtmp-dev libssl-dev libssl-doc libtasn1-3-dev
libyajl-dev
With nothing changed.
Any ideas?
At first remove the broken packages with,
$>sudo apt-get install -f
$>sudo dpkg --configure -a
$>sudo apt-get --fix-broken install
$>sudo apt-get --fix-missing install
$>sudo apt-get clean
$>sudo apt-get autoclean
$>sudo apt-get autoremove
Then upgrade/update the package base,
$>sudo apt-get update
$>sudo apt-get upgrade
Then,
$>sudo apt-get install libboost-all-dev
If the error persists still, then
$> sudo apt-get install <here goes the dependent pkg, in your case here, 'libboost-graph-parallel-dev' etc.>
This should work probably fine. If still you get an error of broken packages, you have to check for the
/var/lib/dpkg/status
file & check for the package which is broken, then remove it.
For more details, check out here.
None of that really worked.
What did work was installing symantec package manager and manually going through and removing the corrupted packages.
Once all the broken packages were removed, installation worked as expected.
Thanks for your help though.
I had the same problem and I found the answer for my case.
Just run followings
$ sudo apt-get remove libboost1.55-all-dev
$ sudo apt-get autoremove

Uninstall boost and install another version

I've installed the boost libraries on Linux Mint 12 using the command sudo apt-get install libboost-dev libboost-doc, which installs the default version available in the repositories. However, the project I have to do needs the 1.44 version of boost. How do I uninstall the default (current) version 1.46 and install 1.44?
I couldn't find the documentation on the boost website to install boost from the .tar.gz package.
Boost can installed by two ways
Deb package
wget and install manually
In some case we might have installed by both type which can cause version error. Lets see how to uninstall both.
sudo apt-get update
# to uninstall deb version
sudo apt-get -y --purge remove libboost-all-dev libboost-doc libboost-dev
# to uninstall the version which we installed from source
sudo rm -f /usr/lib/libboost_*
Then we need to install other dependencies if they are not met
sudo apt-get -y install build-essential g++ python-dev autotools-dev libicu-dev libbz2-dev
Lets download the boost version which we need from the link. I am downloading the 1.54 version. Then untar and install it.
# go to home folder
cd
wget http://downloads.sourceforge.net/project/boost/boost/1.54.0/boost_1_54_0.tar.gz
tar -zxvf boost_1_54_0.tar.gz
cd boost_1_54_0
# get the no of cpucores to make faster
cpuCores=`cat /proc/cpuinfo | grep "cpu cores" | uniq | awk '{print $NF}'`
echo "Available CPU cores: "$cpuCores
./bootstrap.sh # this will generate ./b2
sudo ./b2 --with=all -j $cpuCores install
Now let's check the installed version
cat /usr/local/include/boost/version.hpp | grep "BOOST_LIB_VERSION"
You will see something like below
// BOOST_LIB_VERSION must be defined to be the same as BOOST_VERSION
#define BOOST_LIB_VERSION "1_54"
Version 1.54 of boost is installed
That's it, it worked for me. Let me know if you face any issues.
You can uninstall with
apt-get --purge remove libboost-dev libboost-doc
Download the package you need from boost website, extract and follow "getting started" instructions found inside index.html in the extracted directory.
Tested working Ubuntu 20.04 Use my script to uninstall your older version of boost in ubuntu 20.04 and follow rams instructions above
#!/bin/bash
sudo apt-get -y --purge remove libboost-all-dev libboost-doc libboost-dev
echo "clear boost dir"
sudo rm -r /usr/local/lib/libboost*
sudo rm -r /usr/local/include/boost
sudo rm -r /usr/local/lib/cmake/*
sudo rm -f /usr/lib/libboost_*
sudo rm -r /usr/include/boost
Downgrade your boost version. I'm not familiar with Mint, but assuming it is deb-based, you can do:
apt-cache show libboost-dev
to see all installable version and install a specific version with
sudo apt-get install libboost-dev=1.42.0.1
There are also convenience packages for the major boost versions:
sudo apt-get install libboost1.44-dev
As #savamane wrote you can uninstall it with
apt-get --purge remove libboost-dev libboost-doc
Another suggestion to install the .deb packages as suggested here. (Download the one fitted for your architecture though).
For still supported distros, you can simply search for the package at the distributions at http://packages.ubuntu.com/. For example libboost-system1.46.1 can be found in under the precise -> Libraries tab.
For unsupported distros, there is still a chance to find them at
http://archive.ubuntu.com/. For example can libboost-all-dev_1.40.0.1_amd64.deb be found in
http://archive.ubuntu.com/ubuntu/pool/universe/b/boost-defaults/.
This is how you install a specific Boost version:
cd boost_1_54_0/
./bootstrap.sh --with-libraries=atomic,date_time,exception,filesystem,iostreams,locale,program_options,regex,signals,system,test,thread,timer,log
sudo ./b2 install

Make and build utilities on CentOS/RHEL?

I've been unsuccessfully searching for a way to install make utility on my CentOS 5.2. I've looked through some RPM repositories and online, with no avail. Installing gcc, gcc-c++ didn't help! Package build-essential is not made for CentOS/RHEL. I have RPMFORGE repo enabled in YUM.
yum groupinstall "Development Tools"
or
yum install gcc gcc-c++ kernel-devel
yum install make
also works.
I just double checked and CentOS 5.2 already includes make!
I found it also in one of the online mirrors, if it is easier for you:
http://centos.cogentcloud.com/5.2/os/i386/CentOS/make-3.81-3.el5.i386.rpm
if you installed the 64 bit version:
http://centos.cogentcloud.com/5.2/os/x86_64/CentOS/make-3.81-3.el5.x86_64.rpm
You'll need this if groupinstall doesn't work:
yum install -y gcc-c++ make
This command works for me
yum groupinstall "Development Tools" -y