libcurl4-openssl-dev:armhf cannot be installed when libcurl4-openssl-dev is already installed - c++

I have created a c++ app on Debian Jessie 8.10 amd64 which also need the following libraries:
sudo apt-get install libssl-dev
sudo apt-get install libcurl4-openssl-dev
I also need to cross compile the source code for armhf. So according to this quite helpful link https://wiki.embeddedarm.com/wiki/Jessie_armhf_Cross_Compile I gave the following commands:
sudo apt-get install curl build-essential
su root
echo "deb http://emdebian.org/tools/debian jessie main" >
/etc/apt/sources.list.d/emdebian.list
curl http://emdebian.org/tools/debian/emdebian-toolchain-archive.key | apt-key add -
dpkg --add-architecture armhf
apt-get update
apt-get install crossbuild-essential-armhf
Everything got installed correctly and then I also gave :
sudo apt-get install libssl-dev:armhf
sudo apt-get install libcurl4-openssl-dev:armhf
The first command executed successfully. On the other hand the second one failed giving the following output:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Suggested packages:
libcurl4-doc:armhf libcurl3-dbg:armhf libidn11-dev:armhf libkrb5-dev:armhf libldap2-dev:armhf
librtmp-dev:armhf libssh2-1-dev:armhf pkg-config:armhf
The following NEW packages will be installed:
libcurl4-openssl-dev:armhf
0 upgraded, 1 newly installed, 0 to remove and 2 not upgraded.
23 not fully installed or removed.
Need to get 0 B/316 kB of archives.
After this operation, 863 kB of additional disk space will be used.
(Reading database ... 94032 files and directories currently installed.)
Preparing to unpack .../libcurl4-openssl-dev_7.38.0-4+deb8u8_armhf.deb ...
Unpacking libcurl4-openssl-dev:armhf (7.38.0-4+deb8u8) ...
dpkg: error processing archive /var/cache/apt/archives/libcurl4-openssl-dev_7.38.0-4+deb8u8_armhf.deb (--unpack):
trying to overwrite shared '/usr/include/curl/curlbuild.h', which is different from other instances of package libcurl4-openssl-dev:armhf
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
Processing triggers for man-db (2.7.0.2-5) ...
Errors were encountered while processing:
/var/cache/apt/archives/libcurl4-openssl-dev_7.38.0-4+deb8u8_armhf.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
Since I'm quite new in cross compilation procedures does anyone have any idea what I'm doing wrong?

You are doing nothing wrong. It is a file conflict in related with multiarch packages. It is a bug in the package
Here is a explanation of this kind of bugs, from https://wiki.debian.org/MultiArch/Hints
The package in question is marked Multi-Arch: same, but has
conflicting versions of at least one file for different architectures.
The hint tells the filename (or the number of filenames) and the
architectures (or number of architectures) in question. The easiest
way to fix is to remove the Multi-Arch: same declaration, but often
enough it can be fixed by moving the offending files to
per-architecture locations (typically
/usr/lib/$(DEB_HOST_MULTIARCH)/). For *-dev packages, the Multi-Arch:
same capability often is not critical and removing is a good initial
measure.
I just run into the same kind of problem, which still is an issue with some packages. In my case libcurl-openssl-dev was replacing the /usr/bin/curl-config binary.
To me it required swapping from x64/i386 libraries when i needed cross-compiling but i am well aware it might not be possible for everyone.

Related

How to solve multilib problem on yum update?

When I try to update yum on centos 7 I get a multilib error:
Errore: Multilib version problems found. This often means that the root
cause is something else and multilib version checking is just
pointing out that there is a problem. Eg.:
1. You have an upgrade for libnghttp2 which is missing some
dependency that another package requires. Yum is trying to
solve this by installing an older version of libnghttp2 of the
different architecture. If you exclude the bad architecture
yum will tell you what the root cause is (which package
requires what). You can try redoing the upgrade with
--exclude libnghttp2.otherarch ... this should give you an error
message showing the root cause of the problem.
2. You have multiple architectures of libnghttp2 installed, but
yum can only see an upgrade for one of those architectures.
If you don't want/need both architectures anymore then you
can remove the one with the missing update and everything
will work.
3. You have duplicate versions of libnghttp2 installed already.
You can use "yum check" to get yum show these errors.
...you can also use --setopt=protected_multilib=false to remove
this checking, however this is almost never the correct thing to
do as something else is very likely to go wrong (often causing
much more problems).
Versioni multilib protette: libnghttp2-1.33.0-1.1.el7.x86_64 != libnghttp2-1.31.1-2.el7.i686
I tried to get rid of the problem by:
sudo yum erase libselinux.i686
but that changed nothing.
sudo package-cleanup --dupes
gives nothing.
If I execute:
sudo yum list --showduplicates libselinux
Plugin abilitati:fastestmirror, langpacks
Repository nodesource is listed more than once in the configuration
Repository nodesource-source is listed more than once in the
configuration
Loading mirror speeds from cached hostfile
base: mirror.airenetworks.es
city-fan.org: www.city-fan.org
epel: mirror.uv.es
extras: mirror.airenetworks.es
remi: remirepo.reloumirrors.net
remi-php73: remirepo.reloumirrors.net
remi-php74: remirepo.reloumirrors.net
remi-safe: remirepo.reloumirrors.net
updates: mirror.airenetworks.es
webtatic: uk.repo.webtatic.com
Pacchetti installati
libselinux.i686 2.5-15.el7 #base
libselinux.x86_64 2.5-15.el7 #base
Pacchetti disponibili
libselinux.i686 2.5-15.el7 base
libselinux.x86_64 2.5-15.el7 base
What should I do to fix it?
Thanks,
The issue was apparently fixed by executing:
sudo yum erase libnghttp2.i686
After that yum update worked seamlessly.

CentOS 7: reinstalling python2.7 and yum

I removed by mistake /usr/lib64/libpython2.7.so, and as a consequence, yum does not work.
So I'm trying to reinstall python2.7.18 (which is the version that I currently have) from source, but in compilation I get that some modules are missing
Python build finished, but the necessary bits to build these modules were not found:
_bsddb _curses _curses_panel
_ssl _tkinter bsddb185
bz2 dl imageop
readline sunaudiodev
To find the necessary bits, look in setup.py in detect_modules() for the module's name.
But:
yum doesn't work, pip2 also doesn't work, setuptools for python setup.py install is not found...
And all solutions I'm finding involve some of those, so I'm getting into some circular problem here.
I looked for the *.rpm for python 2.7.18 for CentOS 7, in the hope I could just install it with rpm and solve the issue, but I couldn't find it.
Any idea?
Found a solution, starting from here.
After manually rm-ing all the /usr/**/*python2.7* files (probably just the libpython2.7.so* and the python2.7 executables would be enough), from
http://mirror.centos.org/centos/7/os/x86_64/Packages/, I downloaded
bzip2-devel-1.0.6-13.el7.x86_64.rpm
compat-db-4.7.25-28.el7.x86_64.rpm
dlm-devel-4.0.7-1.el7.x86_64.rpm
dlm-lib-4.0.7-1.el7.x86_64.rpm
gdbm-1.10-8.el7.x86_64.rpm
gdbm-devel-1.10-8.el7.x86_64.rpm
keyutils-libs-devel-1.5.8-3.el7.x86_64.rpm
krb5-devel-1.15.1-46.el7.x86_64.rpm
libcom_err-devel-1.42.9-17.el7.x86_64.rpm
libdb-devel-5.3.21-25.el7.x86_64.rpm
libdb-tcl-5.3.21-25.el7.x86_64.rpm
libdb-tcl-devel-5.3.21-25.el7.x86_64.rpm
libselinux-devel-2.5-15.el7.x86_64.rpm
libsepol-devel-2.5-10.el7.x86_64.rpm
libverto-devel-0.2.5-4.el7.x86_64.rpm
ncurses-devel-5.9-14.20130511.el7_4.x86_64.rpm
openssl-devel-1.0.2k-19.el7.x86_64.rpm
pkgconfig-0.27.1-4.el7.x86_64.rpm
python-2.7.5-88.el7.x86_64.rpm
python-devel-2.7.5-88.el7.x86_64.rpm
python-libs-2.7.5-88.el7.x86_64.rpm
python-pycurl-7.19.0-19.el7.x86_64.rpm
sqlite-3.7.17-8.el7_7.1.x86_64.rpm
sqlite-devel-3.7.17-8.el7_7.1.x86_64.rpm
sqlite-tcl-3.7.17-8.el7_7.1.x86_64.rpm
python-setuptools-0.9.8-7.el7.noarch.rpm
python-six-1.9.0-2.el7.noarch.rpm
python-tools-2.7.5-88.el7.x86_64.rpm
python-urlgrabber-3.10-10.el7.noarch.rpm
readline-6.2-11.el7.x86_64.rpm
readline-devel-6.2-11.el7.x86_64.rpm
popt-devel-1.13-16.el7.x86_64.rpm
rpm-4.11.3-43.el7.x86_64.rpm
rpm-apidocs-4.11.3-43.el7.noarch.rpm
rpm-build-4.11.3-43.el7.x86_64.rpm
rpm-build-libs-4.11.3-43.el7.x86_64.rpm
rpm-devel-4.11.3-43.el7.x86_64.rpm
rpmdevtools-8.3-5.el7.noarch.rpm
rpm-libs-4.11.3-43.el7.x86_64.rpm
rpm-python-4.11.3-43.el7.x86_64.rpm
sqlite-3.7.17-8.el7_7.1.x86_64.rpm
sqlite-devel-3.7.17-8.el7_7.1.x86_64.rpm
tcl-devel-8.5.13-8.el7.x86_64.rpm
tix-8.4.3-12.el7.x86_64.rpm
tix-devel-8.4.3-12.el7.x86_64.rpm
tk-devel-8.5.13-6.el7.x86_64.rpm
tkinter-2.7.5-88.el7.x86_64.rpm
yum-3.4.3-167.el7.centos.noarch.rpm
yum-metadata-parser-1.1.4-10.el7.x86_64.rpm
zlib-devel-1.2.7-18.el7.x86_64.rpm
and installed them with sudo rpm -Uvh --replacepkgs --force *.rpm.
Yum works fine now.

Error "yum update" - Centos 7

When I tried use "yum update" I get these message:
Error: Multilib version problems found. This often means that the root
cause is something else and multilib version checking is just
pointing out that there is a problem. Eg.:
1. You have an upgrade for libstdc++ which is missing some
dependency that another package requires. Yum is trying to
solve this by installing an older version of libstdc++ of the
different architecture. If you exclude the bad architecture
yum will tell you what the root cause is (which package
requires what). You can try redoing the upgrade with
--exclude libstdc++.otherarch ... this should give you an error
message showing the root cause of the problem.
2. You have multiple architectures of libstdc++ installed, but
yum can only see an upgrade for one of those architectures.
If you don't want/need both architectures anymore then you
can remove the one with the missing update and everything
will work.
3. You have duplicate versions of libstdc++ installed already.
You can use "yum check" to get yum show these errors.
...you can also use --setopt=protected_multilib=false to remove
this checking, however this is almost never the correct thing to
do as something else is very likely to go wrong (often causing
much more problems).
Protected multilib versions: libstdc++-4.8.5-16.el7_4.1.i686 != libstdc++-4.8.5-16.el7.x86_64
Error: Protected multilib versions: libgcc-4.8.5-16.el7_4.1.i686 != libgcc-4.8.5-16.el7.x86_64
Error: Protected multilib versions: glibc-2.17-196.el7_4.2.i686 != glibc-2.17-196.el7.x86_64
Before this happened I had executed yum update but it never ended and I killed the pid of a stuck yum update with this command:
kill -9 2514
Try:
rpm --erase --nodeps libstdc++
yum install libstdc++
You need not re-install libstdc++.
Source: https://ask.fedoraproject.org/en/question/37518/cant-install-some-packages-yum-fails-with-multilib-error/
[EDIT]
For Error: ... Specifies Multiple Packages:
rpm -qa | grep -iE "libstdc++"
Here you must get multiple entries of libstdc++, then do:
rpm -e --allmatches libstdc++-4.8.5-16.el7 --nodeps
Do this recursively to resolve all the issues.
Source: https://ximunix.blogspot.in/2012/01/how-to-remove-packages-with-rpm-error.html

Could not install sudo apt-get install libshogun17

When trying to install shogun im getting this error. Can some one suggest a solution?
N: Ignoring file '50unattended-upgrades.ucf-dist' in directory '/etc/apt/apt.conf.d/' as it has an invalid filename extension
E: Unable to locate package libshogun17
Im using ubuntu operating system.
See this explanation of the origin and purpose of .ucf-dist files. This means you can either ignore the notice (that's what the N: prefix stands for) or remove said file.
sudo rm /etc/apt/apt.conf.d/50unattended-upgrades.ucf-dist
libshogun17 is not part of ubuntu by default. Currently we supply two different ppa's for xenial and trusty:
for nightly builds: https://launchpad.net/~shogun-toolbox/+archive/ubuntu/nightly
for stable releases: https://launchpad.net/~shogun-toolbox/+archive/ubuntu/stable
please follow the instruction either the given page or http://shogun.ml/install#ubuntu how to add the ppa to your system.
Note, as mentioned above those PPAs only supply packages for ubuntu trusty or xenial.

ocropus installation on Ubuntu 11.04

I need to install ocropus on Ubuntu 11.04.
I went through a long and painful process of trying ocropus 0.3 and 0.4 from the project's Downloads page, but to no avail - I could find no way of making it locate tesseract, which it recommended. I labored on Google and came across the page http://code.google.com/p/ocropus/wiki/InstallTranscript.
Great. Except when I issue the command:
hg clone $release https://ocropus.googlecode.com/hg/ ocropus
I get the error message:
abort: unknown revision 'ocropus-0.4.4'!
A post here http://aur.archlinux.org/packages.php?ID=13444 by the maintainer of the ocropus package for archlinux says
they have completely refactored ocropus and at the same time they have also completely removed the old repository so it's not possible to access the old "stable" versions. I suggest using the ocropus-hg package, at least for the time being.
I thought I would go ahead with this idea and issued the command:
hg clone https://ocropus.googlecode.com/hg/ ocropus #I deftly avoid any
mention of the release
The result is I get a folder with a file interestingly named ocroinst. I run it and it says I need to run the following commands:
sudo ./ocroinst packages #checks the dependencies
./ocroinst install #installs ocropus
sudo ./ocroinst dl #downloads models
I was glad and I issued the first command, which is when I got the message:
Package libjpeg8-dev is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package libjpeg8-dev has no installation candidate
I think a certain Murphy may have had a point.
The situation, with an delicious added complication, is this:
(please correct me if I am wrong)
Ubuntu 11.04 comes with libjpeg62-dev. The required version for ocropus is libjpeg8-dev.
Ocropus requires libtiff4-dev, and libtiff4-dev depends on libjpeg62-dev. Therefore there is no way for me to uninstall libjpeg62-dev.
libjpeg62-dev conflicts with libjpeg8-dev. Therefore, I can have only one of libjpeg8-dev or libjpeg62-dev, and never both.
If libjpeg8-dev is installed, I will have no libjpeg62-dev, which means I must remove libtiff4-dev and therefore have no way to install ocropus.
If libjpeg62-dev is installed, I will have no libjpeg8-dev and thus I will have no way to install ocropus.
NOTE:
(An experiment description)
I had libjpeg62-dev installed on the system already. I figured I could take a chance and I went right ahead and changed every libjpeg8-dev I could find to libjpeg-dev, and ran the 3 commands.
It installed. No error.
This gave me great joy
until
I ran the command
ocropus <image-file-name>
and I was greeted by the charming:
ImportError: /usr/local/lib/python2.6/dist-packages/_iulib.so: undefined symbol: _ZN5iulib6dcloseEv
The more sophisticated
ocropus book2pages out image*
failed with the same error. A post on stack overflow indicates that this is caused by incorrectly versioned libraries.
THE QUESTION:
How should I proceed?
Thanks in advance.