libboost1.74-dev is not installing on Ubuntu 16.04 - boost

My current boost package is libboost-all-dev(default version 1.58.0.1) which is very old for my current need. So I tried -
sudo apt-get install libboost1.74 libboost1.74-dev
It showed me error of somekind -
libboost1.74 is already the newest version (1.74-0~16~ubuntu16.04.1).
The following NEW packages will be installed:
libboost1.74-dev
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
Need to get 0 B/9,325 kB of archives.
After this operation, 139 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
(Reading database ... 393826 files and directories currently installed.)
Preparing to unpack .../libboost1.74-dev_1.74-0~16~ubuntu16.04.1_amd64.deb ...
Unpacking libboost1.74-dev (1.74-0~16~ubuntu16.04.1) ...
dpkg: error processing archive /var/cache/apt/archives/libboost1.74-dev_1.74-0~16~ubuntu16.04.1_amd64.deb (--unpack):
trying to overwrite '/usr/include/boost/exception_ptr.hpp', which is also in package libboost1.58-dev:amd64 1.58.0+dfsg-5ubuntu3.1
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
Errors were encountered while processing:
/var/cache/apt/archives/libboost1.74-dev_1.74-0~16~ubuntu16.04.1_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
However I tried several times before to manually install boost libraries. They does not seem to work though so I deleted them manually. Is this problem related to my manual deletion process? Or maybe I am doing something wrong?

The message makes it clear that you need to uninstall 1.58 first:
trying to overwrite '/usr/include/boost/exception_ptr.hpp', which is also in package libboost1.58-dev

Related

How can I install Canon scanner/libpango

I am installing Canon MG3650S printer/scanner on Ubuntu 22.04. It looks like something is wrong with installing libpango. I discovered that it was missing from the dependency list. However, after installing it, something is still missing. I noticed that "libpango-1.0-0 set to manually installed", but could not figure out what does it mean. Below you find the screen log.
~/Downloads/scangearmp2-3.20-1-deb$ sudo apt-get install libpango-1.0-0
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
libpango-1.0-0 is already the newest version (1.50.6+ds-2).
libpango-1.0-0 set to manually installed.
0 upgraded, 0 newly installed, 0 to remove and 150 not upgraded.
~/Downloads/scangearmp2-3.20-1-deb$ sudo ./install.sh
==================================================
ScanGear MP
Version 3.20
Copyright CANON INC. 2007-2015
==================================================
Command executed = sudo dpkg -iG ./packages/scangearmp2_3.20-1_amd64.deb
Selecting previously unselected package scangearmp2.
(Reading database ... 272630 files and directories currently installed.)
Preparing to unpack .../scangearmp2_3.20-1_amd64.deb ...
Unpacking scangearmp2 (3.20-1) ...
dpkg: dependency problems prevent configuration of scangearmp2:
scangearmp2 depends on libpango1.0-0 (>= 1.14.0); however:
Package libpango1.0-0 is not installed.
dpkg: error processing package scangearmp2 (--install):
dependency problems - leaving unconfigured
Errors were encountered while processing:
scangearmp2
Command executed = sudo dpkg -P scangearmp2
(Reading database ... 272652 files and directories currently installed.)
Removing scangearmp2 (3.20-1) ...
Purging configuration files for scangearmp2 (3.20-1) ...
BTW: On another copy of the same Ubuntu, I did not notice this issue. What could be the cause?
You need the Package libpango1.0-0 - which can be install with Synaptic. That was my problem too. After that everything OK.
dpkg -L libpango1.0-0
dpkg -L libpango-1.0-0

Octave: error installing package on Windows

First of all, I know a lot of questions similar to mine have been asked, and nevertheless they don't help me solve the problem I'm facing. I'm running Octave 5.1.0.0 on Windows 10 Pro 64 bit. I'm having no issues but one: when I try to install Symbolic package by pkg install symbolic-2.7.1.tar.gz (downloaded from Octave Forge), I get the error
unpack: unarchiving program exited with status: 1
tar: Error opening archive: Failed to open
'/C/Users/smlvcfncst/Downloads/symbolic-2.7.1.tar.gz'
error: called from
unpack at line 274 column 5
untar at line 48 column 5
install at line 81 column 9
pkg at line 441 column 9
and I have no clue where the problem related to the unpacking could be. Not only I have 7z and Winrar installed, but moreover I use a full installation of Cmder, so my system has everything that is needed to work with a .tar.gz
I've tried in different terminals, both with and without administrator privileges, and the problem persists. How should I proceed then?
EDIT: Following Andy's suggestion, I let you know that even before installing Octave I already have installed and used both Python and MinGW, as well as sympy module. Moreover, my Octave installation was the most standard possible for Windows, that is using the official .exe installer. No other package, apart from those included with installation, have been added before I tried adding symbolic.
Thank you in advance.

Bash on Ubuntu on Windows can't use `sudo apt-get install <packagename>`

I was excited to use bash on windows but quickly ran into an issue. I am trying to install build-essential, but I get a dependency issue. Upon trying to resolve with sudo apt-get install -f, I run into another error that doesn't make much sense. I've tried update and upgrade, but that didn't work either. F
barzevp#UK-LT-8356:~$ sudo apt-get install build-essential
Reading package lists... Done
Building dependency tree
Reading state information... Done
build-essential is already the newest version.
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies.
libc6-dev : Depends: linux-libc-dev but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
barzevp#UK-LT-8356:~$ sudo apt-get -f install
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following packages were automatically installed and are no longer required:
libfreetype6 os-prober
Use 'apt-get autoremove' to remove them.
The following extra packages will be installed:
linux-libc-dev
The following NEW packages will be installed
linux-libc-dev
0 to upgrade, 1 to newly install, 0 to remove and 43 not to upgrade.
5 not fully installed or removed.
Need to get 0 B/767 kB of archives.
After this operation, 3,946 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
(Reading database ... 28660 files and directories currently installed.)
Preparing to unpack .../linux-libc-dev_3.13.0-123.172_amd64.deb ...
Unpacking linux-libc-dev:amd64 (3.13.0-123.172) ...
dpkg: error processing archive /var/cache/apt/archives/linux-libc-dev_3.13.0-123.172_amd64.deb (--unpack):
unable to install new version of /usr/include/linux/netfilter_ipv6/ip6t_hl.h': File exists
E: Sub-process /usr/bin/dpkg returned an error code (1)
Full log of what led to the error in Bash on Ubuntu on Windows terminal is here:
https://pastebin.com/dq2D2Gtz
I don't have a solution, but I see the root of the problem. It seems to have to do with case sensitivity on the filesystem. The package for linux-libc-dev puts two copies of a file in /usr/include/linux/netfilter_ipv6 with only a difference in case; ip6t_HL.h, and ip6t_hl.h. After placing ip6t_HL.h, it attempts to rename ip6t_hl.h.dpkg-new to ip6t_hl.h. The system call to rename the file fails, claiming that ip6t_hl.h already exists
On a "real" linux system, ip6t_HL.h and ip6t_hl.h would clearly be different files. Under WSL they probably had some strange incompatibilities to work out between NTFS's default case insensitive FS and unix's default case sensitivity.
You can duplicate the problem by hand e.g., with
echo hi > foo.H
echo hi > foo.h-new
mv foo.h-new foo.h
mv: cannot move 'foo.h-new' to 'foo.h': File exists
strace output:
rename("/usr/include/linux/netfilter_ipv6/ip6t_HL.h.dpkg-new", "/usr/include/linux/netfilter_ipv6/ip6t_HL.h") = 0
open("/usr/include/linux/netfilter_ipv6/ip6t_hl.h.dpkg-new", O_WRONLY) = 10
fsync(10) = 0
close(10) = 0
rename("/usr/include/linux/netfilter_ipv6/ip6t_hl.h.dpkg-new", "/usr/include/linux/netfilter_ipv6/ip6t_hl.h") = -1 EEXIST (File exists)
write(2, "dpkg: error processing archive /"..., 199dpkg: error processing archive /var/cache/apt/archives/linux-libc-dev_4.4.0-98.121_amd64.deb (--install):
unable to install new version of '/usr/include/linux/netfilter_ipv6/ip6t_hl.h': File exists
) = 199
I had the same problem. Like #dmattp I found that it this is because, unfortunately, the package contains some (header) files with names that are distinct only by letter case, and that the wonderful WSL file system has an inconsistency regarding case sensitiveness.
Here is a workaround, assuming that the package has name linux-libc-dev_3.13.0-123.172_amd64.deb:
cd any-temp-dir
apt-get download linux-libc-dev
ar x linux-libc-dev_3.13.0-123.172_amd64.deb
tar xJf data.tar.xz # ignore all erors like ./usr/include/linux/netfilter_ipv4/ipt_ttl.h: Cannot open: Input/output error
tar cJf data.tar.xz ./usr
ar rcs linux-libc-dev_3.13.0-123.172_amd64-patched.deb debian-binary control.tar.gz data.tar.xz
sudo dpkg -i linux-libc-dev_3.13.0-123.172_amd64-patched.deb
It says dependencies aren't being installed, so try:
sudo apt-get install linux-libc-dev
If that doesn't work try:
sudo apt-get install --reinstall build-essential
This will reinstall build-essential. Hope this helps, cheers!

Reinstall pip after upgrade to Ubuntu 14.x?

I'm on Ubuntu 14.x. I'm trying to re-install pip. The package appears to be in an inconsistent state. (Possibly a result of some manual file-deletions I did earlier.) Reinstall does not work, and I'm hesitant to force a package-removal through apt-get. How to proceed?
If I try to remove the pip package, I get this error:
$ sudo apt-get remove python-pip
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
python-chardet-whl python-colorama python-colorama-whl python-distlib
python-distlib-whl python-html5lib python-html5lib-whl python-pip-whl
python-requests-whl python-setuptools-whl python-six-whl python-urllib3-whl
python-wheel
Use 'apt-get autoremove' to remove them.
The following packages will be REMOVED:
python-pip
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 477 kB disk space will be freed.
Do you want to continue? [Y/n] Y
dpkg: error processing package python-pip (--remove):
package is in a very bad inconsistent state; you should
reinstall it before attempting a removal
Errors were encountered while processing:
python-pip
E: Sub-process /usr/bin/dpkg returned an error code (1)
If I then try to clean up the installed version of pip, I get this error:
$ sudo apt-get install --reinstall python-pip
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
Need to get 0 B/97.3 kB of archives.
After this operation, 0 B of additional disk space will be used.
Selecting previously unselected package python-pip.
(Reading database ... 71400 files and directories currently installed.)
Preparing to unpack .../python-pip_1.5.4-1ubuntu4_all.deb ...
File "/usr/bin/pyclean", line 63
except (IOError, OSError), e:
^
SyntaxError: invalid syntax
dpkg: warning: subprocess old pre-removal script returned error exit status 1
dpkg: trying script from the new package instead ...
File "/usr/bin/pyclean", line 63
except (IOError, OSError), e:
^
SyntaxError: invalid syntax
dpkg: error processing archive /var/cache/apt/archives/python-pip_1.5.4-1ubuntu4_all.deb (--unpack):
subprocess new pre-removal script returned error exit status 1
Traceback (most recent call last):
File "/usr/bin/pycompile", line 35, in <module>
from debpython.version import SUPPORTED, debsorted, vrepr, \
File "/usr/share/python/debpython/version.py", line 24, in <module>
from ConfigParser import SafeConfigParser
ImportError: No module named 'ConfigParser'
dpkg: error while cleaning up:
subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
/var/cache/apt/archives/python-pip_1.5.4-1ubuntu4_all.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
Thanks!

LXC-Docker fails on dependencies

Installing on Ubuntu 13.06 x64, it's an OpenVZ virtual machine.
Followed the script to the letter, and received a couple errors...
root#dev:/# sudo apt-get install linux-image-extra-`uname -r`
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package linux-image-extra-2.6.32-042stab081.3
E: Couldn't find any package by regex 'linux-image-extra-2.6.32-042stab081.3'
root#dev:/#
though I am able to to:
root#dev:/# uname -r
2.6.32-042stab081.3
root#dev:/#
Then when I attempt to install I receive the following (this is a second attempt, so obviously stripped down)
root#dev:/# sudo apt-get install lxc-docker
Reading package lists... Done
Building dependency tree
Reading state information... Done
lxc-docker is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
4 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 lxc (0.9.0-0ubuntu3.4) ...
start: Job failed to start
invoke-rc.d: initscript lxc-net, action "start" failed.
dpkg: error processing lxc (--configure):
subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of lxc-templates:
lxc-templates depends on lxc (>= 0.8.0~rc1-4ubuntu43); however:
Package lxc is not configured yet.
dpkg: error processing lxc-templates (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of lxc-docker-0.6.3:
lxc-docker-0.6.3 depends on lxc; however:
Package lxc is not configured yet.
dpkg: error processing lxc-docker-0.6.3 (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of lxc-docker:
lxc-docker depends on lxc-docker-0.6.3; however:
Package lxc-docker-0.6.3 is not configured yet.
dpkg: error processing lxc-docker (--configure):
dependency problems - leaving unconfigured
Errors were encountered while processing:
lxc
lxc-templates
lxc-docker-0.6.3
lxc-docker
E: Sub-process /usr/bin/dpkg returned an error code (1)
root#dev:/#
There are two distinct problems here.
Missing linux-image-extra-$(uname -r) package.
This is because the Docker installation script makes the bold assumption that if you are running kernel e.g. 3.8.0-30, it was installed from the package linux-image-3.8.0-30, and there should be a package linux-image-extra-3.8.0-30 containing extra files (including the AUFS module, which is necessary to run Docker). If you are running a kernel which is not a stock Ubuntu kernel, this assumption will be false, the linux-image-extra-... package won't exist, and the script will fail miserably.
However, if you know that you have AUFS support in your kernel (or that the AUFS module for your kernel is installed one way or another), you can safely skip this step.
Admittedly, the install script should investigate a bit more about your environment, and try to install this -extra- package only when it makes sense.
Cannot install lxc package inside an OpenVZ container.
The postinstall script of the lxc package tries to start the lxc-net service, which tries to setup the lxcbr0 bridge. I don't have an OpenVZ environment here to test this, but I think that you cannot create a bridge within an OpenVZ environment. Therefore, the service fails to start, and the postinstall script reports a failure, and the lxc package cannot be recorded as "installed", and the Docker package (lxc-docker) doesn't want to install if its dependencies are not correctly installed.
You can work around this by preventing the service from starting; for instance by doing:
echo exit 101 | sudo tee /usr/sbin/policy-rc.d
sudo chmod +x /usr/sbin/policy-rc.d
However, I am almost sure that you won't be able to run Docker within OpenVZ, because you won't be able to run containers inside OpenVZ. Again, I don't have an OpenVZ environment to test; but I would be very surprised if that worked.
I strongly suggest to run Docker on a more recent kernel (e.g. 3.8), and not inside OpenVZ.
However, if you absolutely need to run Docker within OpenVZ, there is a way to do it; but it is very hackish. There will be a performance hit, and there might be side-effects. If you want to try anyway, you can check Sekexe. It will let you start arbitrary processes within a user-mode-linux kernel. I have used it successfully to run Docker tests within Travis CI. I wouldn't recommend it for anything else, though.
I was playing a bit with sekexe, but I totally agree with jpetazzo; it's cool but not for production. Instead I started using debootstrap + chrooted jails to have a similar Docker-ish experience (but not as cool as docker of course).
You might want to check this: http://coderofsalvation.github.io/debootstrap-container
I'm using this now on an OpenVZ VPS to separate packages/projects in tidy containers. Disclaimer: I am the author.

Resources