install g++-7: unmet dependencies - linux

I would like to install gcc-7 together with g++-7. First I have installed gcc7 successfully. Of course I've done
sudo apt update
Then I'm unable to install g++7:
anton#AntonLinux:/$ sudo apt install g++-7
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
libc6-dev : Breaks: libgcc-7-dev (< 7.5.0-6~) but 7.5.0-3ubuntu1~18.04 is to be installed
E: Unable to correct problems, you have held broken packages.
I also tried removing libgcc-7-dev but it didn't help. Currently the following related packages are installed:
anton#AntonLinux:/$ apt list --installed | grep libgcc
WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
libgcc-10-dev/unstable,now 10.2.0-13 amd64 [installed,automatic]
libgcc-4.8-dev/bionic,now 4.8.5-4ubuntu8 amd64 [installed,automatic]
libgcc-6-dev/bionic-updates,now 6.5.0-2ubuntu1~18.04 amd64 [installed,automatic]
libgcc-s1/unstable,now 10.2.0-13 amd64 [installed,automatic]
libgcc-s1/unstable,now 10.2.0-13 i386 [installed,automatic]
libgcc1/bionic-updates,bionic-security,now 1:8.4.0-1ubuntu1~18.04 amd64 [installed,upgradable to: 1:10.1.0-1]
libgcc1/bionic-updates,bionic-security,now 1:8.4.0-1ubuntu1~18.04 i386 [installed,upgradable to: 1:10.1.0-1]
anton#AntonLinux:/$ apt list --installed | grep libc6
WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
libc6-dbg/unstable,now 2.31-4 amd64 [installed,automatic]
libc6/unstable,now 2.31-4 amd64 [installed,automatic]
libc6/unstable,now 2.31-4 i386 [installed,automatic]
anton#AntonLinux:/$ apt list --installed | grep gcc
WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
gcc-10-base/unstable,now 10.2.0-13 amd64 [installed,automatic]
gcc-10-base/unstable,now 10.2.0-13 i386 [installed,automatic]
gcc-10/unstable,now 10.2.0-13 amd64 [installed,automatic]
gcc-4.8-base/bionic,now 4.8.5-4ubuntu8 amd64 [installed,automatic]
gcc-4.8/bionic,now 4.8.5-4ubuntu8 amd64 [installed]
gcc-6-base/bionic-updates,now 6.5.0-2ubuntu1~18.04 amd64 [installed,automatic]
gcc-6/bionic-updates,now 6.5.0-2ubuntu1~18.04 amd64 [installed,automatic]
gcc-7-base/bionic-updates,bionic-security,now 7.5.0-3ubuntu1~18.04 amd64 [installed,automatic]
gcc-8-base/bionic-updates,bionic-security,now 8.4.0-1ubuntu1~18.04 amd64 [installed,upgradable to: 8.4.0-4]
gcc-8-base/bionic-updates,bionic-security,now 8.4.0-1ubuntu1~18.04 i386 [installed,upgradable to: 8.4.0-4]
gcc/unstable,now 4:10.2.0-1 amd64 [installed,automatic]
libgcc-10-dev/unstable,now 10.2.0-13 amd64 [installed,automatic]
libgcc-4.8-dev/bionic,now 4.8.5-4ubuntu8 amd64 [installed,automatic]
libgcc-6-dev/bionic-updates,now 6.5.0-2ubuntu1~18.04 amd64 [installed,automatic]
libgcc-s1/unstable,now 10.2.0-13 amd64 [installed,automatic]
libgcc-s1/unstable,now 10.2.0-13 i386 [installed,automatic]
libgcc1/bionic-updates,bionic-security,now 1:8.4.0-1ubuntu1~18.04 amd64 [installed,upgradable to: 1:10.1.0-1]
libgcc1/bionic-updates,bionic-security,now 1:8.4.0-1ubuntu1~18.04 i386 [installed,upgradable to: 1:10.1.0-1]

Related

Can't install vaex on Python 3.7.5 and Ubuntu 18.04 because of LLVM?

Trying to install vaex package using sudo pip3 install vaex
But getting the following error:
got version from file /tmp/pip-build-4ejf0kw2/llvmlite/llvmlite/_version.py {'version': '0.34.0', 'full': 'c5889c9e98c6b19d5d85ebdd982d64a03931f8e2'}
running build_ext
/usr/bin/python3 /tmp/pip-build-4ejf0kw2/llvmlite/ffi/build.py
LLVM version... Traceback (most recent call last):
File "/tmp/pip-build-4ejf0kw2/llvmlite/ffi/build.py", line 105, in main_posix
out = subprocess.check_output([llvm_config, '--version'])
File "/usr/lib/python3.7/subprocess.py", line 411, in check_output
**kwargs).stdout
File "/usr/lib/python3.7/subprocess.py", line 488, in run
with Popen(*popenargs, **kwargs) as process:
File "/usr/lib/python3.7/subprocess.py", line 800, in __init__
restore_signals, start_new_session)
File "/usr/lib/python3.7/subprocess.py", line 1551, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'llvm-config': 'llvm-config'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/tmp/pip-build-4ejf0kw2/llvmlite/ffi/build.py", line 191, in <module>
main()
File "/tmp/pip-build-4ejf0kw2/llvmlite/ffi/build.py", line 181, in main
main_posix('linux', '.so')
File "/tmp/pip-build-4ejf0kw2/llvmlite/ffi/build.py", line 108, in main_posix
"to the path for llvm-config" % (llvm_config,))
RuntimeError: llvm-config failed executing, please point LLVM_CONFIG to the path for llvm-config
error: command '/usr/bin/python3' failed with exit status 1
Anybody can guide me how to solve it?
Here is my list of lvvm:
libllvm-10-ocaml-dev/unknown 1:10.0.1~++20200809072545+ef32c611aa2-1~exp1~20200809173142.193 amd64
libllvm-7-ocaml-dev/bionic-updates,now 1:7-3~ubuntu0.18.04.1 amd64 [installed]
libllvm-8-ocaml-dev/bionic-updates,bionic-security 1:8-3~ubuntu18.04.2 amd64
libllvm-9-ocaml-dev/bionic-updates,bionic-security 1:9-2~ubuntu18.04.2 amd64
libllvm10/unknown,now 1:10.0.1~++20200809072545+ef32c611aa2-1~exp1~20200809173142.193 amd64 [installed,automatic]
libllvm3.9/bionic 1:3.9.1-19ubuntu1 amd64
libllvm3.9-dbg/bionic 1:3.9.1-19ubuntu1 amd64
libllvm4.0/bionic 1:4.0.1-10 amd64
libllvm4.0-dbg/bionic 1:4.0.1-10 amd64
libllvm5.0/bionic 1:5.0.1-4 amd64
libllvm5.0-dbg/bionic 1:5.0.1-4 amd64
libllvm6.0/bionic,now 1:6.0-1ubuntu2 amd64 [installed,automatic]
libllvm6.0-dbg/bionic 1:6.0-1ubuntu2 amd64
libllvm7/bionic-updates,now 1:7-3~ubuntu0.18.04.1 amd64 [installed]
libllvm8/bionic-updates,bionic-security 1:8-3~ubuntu18.04.2 amd64
libllvm9/bionic-updates,bionic-security,now 1:9-2~ubuntu18.04.2 amd64 [installed,automatic]
libstd-rust-1.24/bionic 1.24.1+dfsg1+llvm-0ubuntu2 amd64
libstd-rust-1.25/bionic-updates,bionic-security 1.25.0+dfsg1+llvm-0ubuntu1 amd64
libstd-rust-1.28/bionic-updates,bionic-security 1.28.0+dfsg1+llvm-0ubuntu1~18.04.1 amd64
libstd-rust-1.30/bionic-updates,bionic-security 1.30.0+dfsg1+llvm-2ubuntu1~18.04.1 amd64
libstd-rust-1.31/bionic-updates,bionic-security 1.31.0+dfsg1+llvm-2ubuntu1~18.04.1 amd64
libstd-rust-1.32/bionic-updates,bionic-security 1.32.0+dfsg1+llvm-1ubuntu1~18.04.1 amd64
libstd-rust-1.34/bionic-updates,bionic-security 1.34.1+dfsg2+llvm-0ubuntu1~18.04.1 amd64
libstd-rust-1.35/bionic-updates,bionic-security 1.35.0+dfsg0.1+llvm-0ubuntu1~18.04.1 amd64
libstd-rust-1.36/bionic-updates,bionic-security 1.36.0+dfsg1+llvm-2ubuntu1~18.04.1 amd64
libstd-rust-1.37/bionic-updates,bionic-security 1.37.0+dfsg1+llvm-1ubuntu1~18.04.1 amd64
libstd-rust-1.39/bionic-updates,bionic-security 1.39.0+dfsg1+llvm-3ubuntu1~18.04.1 amd64
libstd-rust-1.41/bionic-updates,bionic-security 1.41.0+dfsg1+llvm-0ubuntu1~18.04.1 amd64
libstd-rust-1.43/bionic-updates,bionic-security 1.43.0+dfsg1+llvm-1~exp1ubuntu2~18.04.1 amd64
libstd-rust-dev/bionic-updates,bionic-security 1.43.0+dfsg1+llvm-1~exp1ubuntu2~18.04.1 amd64
libstd-rust-dev-wasm32-cross/bionic-updates,bionic-security 1.41.0+dfsg1+llvm-0ubuntu1~18.04.1 all
llvm/bionic-updates 1:6.0-41~exp5~ubuntu1 amd64
llvm-10/unknown,now 1:10.0.1~++20200809072545+ef32c611aa2-1~exp1~20200809173142.193 amd64 [installed]
llvm-10-dev/unknown,now 1:10.0.1~++20200809072545+ef32c611aa2-1~exp1~20200809173142.193 amd64 [installed]
llvm-10-doc/unknown 1:10.0.1~++20200809072545+ef32c611aa2-1~exp1~20200809173142.193 all
llvm-10-examples/unknown 1:10.0.1~++20200809072545+ef32c611aa2-1~exp1~20200809173142.193 all
llvm-10-runtime/unknown,now 1:10.0.1~++20200809072545+ef32c611aa2-1~exp1~20200809173142.193 amd64 [installed,automatic]
llvm-10-tools/unknown,now 1:10.0.1~++20200809072545+ef32c611aa2-1~exp1~20200809173142.193 amd64 [installed,automatic]
llvm-3.7-doc/bionic 1:3.7.1-5ubuntu3 all
llvm-3.9/bionic 1:3.9.1-19ubuntu1 amd64
llvm-3.9-dev/bionic 1:3.9.1-19ubuntu1 amd64
llvm-3.9-doc/bionic 1:3.9.1-19ubuntu1 all
llvm-3.9-examples/bionic 1:3.9.1-19ubuntu1 all
llvm-3.9-runtime/bionic 1:3.9.1-19ubuntu1 amd64
llvm-3.9-tools/bionic 1:3.9.1-19ubuntu1 amd64
llvm-4.0/bionic 1:4.0.1-10 amd64
llvm-4.0-dev/bionic 1:4.0.1-10 amd64
llvm-4.0-doc/bionic 1:4.0.1-10 all
llvm-4.0-examples/bionic 1:4.0.1-10 all
llvm-4.0-runtime/bionic 1:4.0.1-10 amd64
llvm-4.0-tools/bionic 1:4.0.1-10 amd64
llvm-5.0/bionic 1:5.0.1-4 amd64
llvm-5.0-dev/bionic 1:5.0.1-4 amd64
llvm-5.0-doc/bionic 1:5.0.1-4 all
llvm-5.0-examples/bionic 1:5.0.1-4 all
llvm-5.0-runtime/bionic 1:5.0.1-4 amd64
llvm-5.0-tools/bionic 1:5.0.1-4 amd64
llvm-6.0/bionic 1:6.0-1ubuntu2 amd64
llvm-6.0-dev/bionic 1:6.0-1ubuntu2 amd64
llvm-6.0-doc/bionic 1:6.0-1ubuntu2 all
llvm-6.0-examples/bionic 1:6.0-1ubuntu2 all
llvm-6.0-runtime/bionic 1:6.0-1ubuntu2 amd64
llvm-6.0-tools/bionic 1:6.0-1ubuntu2 amd64
llvm-7/bionic-updates,now 1:7-3~ubuntu0.18.04.1 amd64 [installed]
llvm-7-dev/bionic-updates,now 1:7-3~ubuntu0.18.04.1 amd64 [installed]
llvm-7-doc/bionic-updates,now 1:7-3~ubuntu0.18.04.1 all [installed]
llvm-7-examples/bionic-updates,now 1:7-3~ubuntu0.18.04.1 all [installed]
llvm-7-runtime/bionic-updates,now 1:7-3~ubuntu0.18.04.1 amd64 [installed]
llvm-7-tools/bionic-updates 1:7-3~ubuntu0.18.04.1 amd64
llvm-8/bionic-updates,bionic-security 1:8-3~ubuntu18.04.2 amd64
llvm-8-dev/bionic-updates,bionic-security 1:8-3~ubuntu18.04.2 amd64
llvm-8-doc/bionic-updates,bionic-security 1:8-3~ubuntu18.04.2 all
llvm-8-examples/bionic-updates,bionic-security 1:8-3~ubuntu18.04.2 all
llvm-8-runtime/bionic-updates,bionic-security 1:8-3~ubuntu18.04.2 amd64
llvm-8-tools/bionic-updates,bionic-security 1:8-3~ubuntu18.04.2 amd64
llvm-9/bionic-updates,bionic-security,now 1:9-2~ubuntu18.04.2 amd64 [installed,automatic]
llvm-9-dev/bionic-updates,bionic-security,now 1:9-2~ubuntu18.04.2 amd64 [installed,automatic]
llvm-9-doc/bionic-updates,bionic-security 1:9-2~ubuntu18.04.2 all
llvm-9-examples/bionic-updates,bionic-security 1:9-2~ubuntu18.04.2 all
llvm-9-runtime/bionic-updates,bionic-security,now 1:9-2~ubuntu18.04.2 amd64 [installed,automatic]
llvm-9-tools/bionic-updates,bionic-security,now 1:9-2~ubuntu18.04.2 amd64 [installed,automatic]
llvm-dev/bionic-updates 1:6.0-41~exp5~ubuntu1 amd64
llvm-runtime/bionic-updates 1:6.0-41~exp5~ubuntu1 amd64
llvmlite-doc/bionic 0.19.0-2 all
python-llvmlite/bionic 0.19.0-2 amd64
python3-llvmlite/bionic 0.19.0-2 amd64
rust-doc/bionic-updates,bionic-security 1.43.0+dfsg1+llvm-1~exp1ubuntu2~18.04.1 all
rust-gdb/bionic-updates,bionic-security 1.43.0+dfsg1+llvm-1~exp1ubuntu2~18.04.1 all
rust-lldb/bionic-updates,bionic-security 1.43.0+dfsg1+llvm-1~exp1ubuntu2~18.04.1 all
rust-src/bionic-updates,bionic-security 1.43.0+dfsg1+llvm-1~exp1ubuntu2~18.04.1 all
rustc/bionic-updates,bionic-security 1.43.0+dfsg1+llvm-1~exp1ubuntu2~18.04.1 amd64
The solution was to delete manually the llvm package from dist-packages (all versions), install pip (latest version) not pip3.
Right after this I have installed llvmlite 0.33.0 and numba 0.49.1.
Reinstalled vaex who reinstalled llvmlite 0.34.0 and numba 0.51 and vaex installation successfully finished!

upgrade ubuntu 18.04 to 20.04 but packages remain +bionic1

after upgrading to ubuntu 20.04 some package remain in +bionic1 version
sudo apt list | grep python3.8
WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
idle-python3.8/focal-updates,focal-updates,focal-security,focal-security 3.8.2-1ubuntu1.1 all
libpython3.8-dbg/focal-updates,focal-security 3.8.2-1ubuntu1.1 amd64
libpython3.8-dbg/focal-updates,focal-security 3.8.2-1ubuntu1.1 i386
libpython3.8-dev/focal-updates,focal-security 3.8.2-1ubuntu1.1 amd64
libpython3.8-dev/focal-updates,focal-security 3.8.2-1ubuntu1.1 i386
libpython3.8-minimal/now 3.8.2-1+bionic1 amd64 [installed,local]
libpython3.8-minimal/focal-updates,focal-security 3.8.2-1ubuntu1.1 i386
libpython3.8-stdlib/now 3.8.2-1+bionic1 amd64 [installed,local]
libpython3.8-stdlib/focal-updates,focal-security 3.8.2-1ubuntu1.1 i386
libpython3.8-testsuite/focal-updates,focal-updates,focal-security,focal-security 3.8.2-1ubuntu1.1 all
libpython3.8/focal-updates,focal-security 3.8.2-1ubuntu1.1 amd64
libpython3.8/focal-updates,focal-security 3.8.2-1ubuntu1.1 i386
python3.8-dbg/focal-updates,focal-security 3.8.2-1ubuntu1.1 amd64
python3.8-dbg/focal-updates,focal-security 3.8.2-1ubuntu1.1 i386
python3.8-dev/focal-updates,focal-security 3.8.2-1ubuntu1.1 amd64
python3.8-dev/focal-updates,focal-security 3.8.2-1ubuntu1.1 i386
python3.8-doc/focal-updates,focal-updates,focal-security,focal-security 3.8.2-1ubuntu1.1 all
python3.8-examples/focal-updates,focal-updates,focal-security,focal-security 3.8.2-1ubuntu1.1 all
python3.8-minimal/now 3.8.2-1+bionic1 amd64 [installed,local]
python3.8-minimal/focal-updates,focal-security 3.8.2-1ubuntu1.1 i386
python3.8-venv/focal-updates,focal-security 3.8.2-1ubuntu1.1 amd64
python3.8-venv/focal-updates,focal-security 3.8.2-1ubuntu1.1 i386
python3.8/now 3.8.2-1+bionic1 amd64 [installed,local]
python3.8/focal-updates,focal-security 3.8.2-1ubuntu1.1 i386
as you can see above python3.8-minimal/now 3.8.2-1+bionic1 amd64 [installed,local] remain in bionic version if I want to purge and install python3.8 then many dependency will removed too and this may cause break my OS how can I push ubuntu to switch all install +bionic1 package to focal version ubuntu1.1 or ubuntu1
Ultimately, the maintainers probably need to make an upstream patch to the Python packages as the version/epoch parser apparently believes the prefix -1+bionic1 to be newer than -1ubuntu1.1.
In my case, the -1+bionic1 prefix for Python 3.8 came from installing Python 3.8 packages from the deadsnakes PPA and not from the canonical repositories.
That said, I was able to force a "downgrade" to the correct Ubuntu-Focal packages using this command:
sudo apt install libpython3.8:amd64=3.8.2-1ubuntu1.1 libpython3.8-dev:amd64=3.8.2-1ubuntu1.1 libpython3.8-minimal:amd64=3.8.2-1ubuntu1.1 libpython3.8-stdlib:amd64=3.8.2-1ubuntu1.1 python3.8=3.8.2-1ubuntu1.1 python3.8-minimal=3.8.2-1ubuntu1.1
I ran into this issue trying to install other Python libraries like python3-venv after an 18.04->20.04 system upgrade and these packages pinned their dependencies to the 3.8.2-1ubuntu1.1 version.
i was having similar issue while installing vim after upgrade from 18.04 to 20.04. combining pztrick answer and oon arfiandwi comment on accepted answer worked for me
sudo apt install libpython3.8:amd64=3.8.2-1ubuntu1 libpython3.8-dev:amd64=3.8.2-1ubuntu1 libpython3.8-minimal:amd64=3.8.2-1ubuntu1 libpython3.8-stdlib:amd64=3.8.2-1ubuntu1 python3.8=3.8.2-1ubuntu1 python3.8-minimal=3.8.2-1ubuntu1
After running
apt --fix-broken install
I can install vim.

Linking boost_system when configured with apt-get install?

Installed Cevelop 1.11.1
apt-get install g++-9
Get:1 http://archive.ubuntu.com/ubuntu disco/main amd64 cpp-9 amd64 9-20190402-1ubuntu1 [8,861 kB]
Get:2 http://archive.ubuntu.com/ubuntu disco/main amd64 libgcc-9-dev amd64 9-20190402-1ubuntu1 [2,355 kB]
Get:3 http://archive.ubuntu.com/ubuntu disco/main amd64 gcc-9 amd64 9-20190402-1ubuntu1 [9,643 kB]
Get:4 http://archive.ubuntu.com/ubuntu disco/main amd64 libstdc++-9-dev amd64 9-20190402-1ubuntu1 [1,685 kB]
Get:5 http://archive.ubuntu.com/ubuntu disco/universe amd64 g++-9 amd64 9-20190402-1ubuntu1 [10.1 MB]
apt-get install libboost-dev
Get:1 http://archive.ubuntu.com/ubuntu disco/main amd64 libboost1.67-dev amd64 1.67.0-13 [8,362 kB]
Get:2 http://archive.ubuntu.com/ubuntu disco/main amd64 libboost-dev amd64 1.67.0.1 [3,228 B]
Specified boost_system for the linker. This produces an error.
g++-9 -std=c++1z -O0 -g3 -Wall -Wextra -Wconversion -c -fmessage-length=0 -Wno-attributes -fsanitize=undefined -pthread -o aptcp.o ../aptcp.cpp
g++-9 -pthread -o aptcp aptcp.o -ltidy -lboost_system -lssl -lcrypto -lxalan-c -lxalanMsg -lxerces-c
/usr/bin/ld: cannot find -lboost_system
collect2: error: ld returned 1 exit status
sмurf states in his answer:
I would recommend installing package libboost-dev. It will install
whatever is the current version of boost for your system and will put
all files in the proper places.
Per serup's answer my understanding is that 'the library is installed'.
$ /sbin/ldconfig -p | grep boost_system | cut -d\> -f2
/lib/x86_64-linux-gnu/libboost_system.so.1.67.0
So, what is going on here?
The objective is to have a simple repeatable process for installing and using the compiler & libraries, one that builds upon the existing work of the developers & package maintainers. Is there a flaw in my understanding/expectations, in the packaging or the libraries?
The -l option will only find .a or .so library files, it will not find .so.1.67.0 or other.
That could be solved by creating a symbolic link:
ln -sf /your/path/to/libboost_system.so.1.67.0 /your/path/to/libboost_system.so
sudo apt-get install libboost-all-dev
This installed all required symbolic links and static libraries for me on Ubuntu 19.04

Get dev library packages for arm on x64 Ubuntu host?

I am building a project that requires a number of libraries, for windows I got prebuilt libs from MSYS2, for linux from the ubuntu repos, and now I am porting to android, so I need the same libraries for armhf and arm64. The good news is the ubuntu repos have everything I need, the bad news - I can't figure out how to get them using apt, that is get the libs with the entire dependency trees. It is possible to download individual packages from the web, but it gets kind of arduous to get the entire dependency tree, building the libraries from source - tremendously more so.
I can do sudo apt-get install package:uarch for i386 even though I am on a 64bit host, however when I try arm I get a unable to locate package. So how do I get them?
Note 1: I only need the libraries, I don't need toolchains, the NDK already has those.
Note 2: I did try asking on the ubuntu site, but I didn't get any feedback in like a day, and since the question is strictly about development I decided to try here.
Note 3: The question is not about recommending libraries.
EDIT: After dpkg --add-architecture armhf for update I get:
Hit:1 http://bg.archive.ubuntu.com/ubuntu xenial InRelease
Hit:3 http://bg.archive.ubuntu.com/ubuntu xenial-backports InRelease
Get:2 http://bg.archive.ubuntu.com/ubuntu xenial-updates InRelease [95,7 kB]
Ign:4 http://bg.archive.ubuntu.com/ubuntu xenial/main armhf Packages
Ign:5 http://bg.archive.ubuntu.com/ubuntu xenial/restricted armhf Packages
Ign:6 http://bg.archive.ubuntu.com/ubuntu xenial/universe armhf Packages
Ign:7 http://bg.archive.ubuntu.com/ubuntu xenial/multiverse armhf Packages
Ign:4 http://bg.archive.ubuntu.com/ubuntu xenial/main armhf Packages
Ign:5 http://bg.archive.ubuntu.com/ubuntu xenial/restricted armhf Packages
Ign:6 http://bg.archive.ubuntu.com/ubuntu xenial/universe armhf Packages
Ign:7 http://bg.archive.ubuntu.com/ubuntu xenial/multiverse armhf Packages
Ign:4 http://bg.archive.ubuntu.com/ubuntu xenial/main armhf Packages
Ign:5 http://bg.archive.ubuntu.com/ubuntu xenial/restricted armhf Packages
Ign:6 http://bg.archive.ubuntu.com/ubuntu xenial/universe armhf Packages
Hit:8 http://security.ubuntu.com/ubuntu xenial-security InRelease
Ign:7 http://bg.archive.ubuntu.com/ubuntu xenial/multiverse armhf Packages
Ign:9 http://bg.archive.ubuntu.com/ubuntu xenial-backports/main armhf Packages
Ign:10 http://bg.archive.ubuntu.com/ubuntu xenial-backports/universe armhf Packages
Err:4 http://bg.archive.ubuntu.com/ubuntu xenial/main armhf Packages
404 Not Found [IP: 195.85.215.252 80]
Ign:5 http://bg.archive.ubuntu.com/ubuntu xenial/restricted armhf Packages
Ign:6 http://bg.archive.ubuntu.com/ubuntu xenial/universe armhf Packages
Ign:7 http://bg.archive.ubuntu.com/ubuntu xenial/multiverse armhf Packages
Ign:9 http://bg.archive.ubuntu.com/ubuntu xenial-backports/main armhf Packages
Ign:10 http://bg.archive.ubuntu.com/ubuntu xenial-backports/universe armhf Packages
Ign:9 http://bg.archive.ubuntu.com/ubuntu xenial-backports/main armhf Packages
Ign:10 http://bg.archive.ubuntu.com/ubuntu xenial-backports/universe armhf Packages
Get:11 http://bg.archive.ubuntu.com/ubuntu xenial-updates/main amd64 Packages [383 kB]
Get:12 http://bg.archive.ubuntu.com/ubuntu xenial-updates/main i386 Packages [378 kB]
Ign:13 http://bg.archive.ubuntu.com/ubuntu xenial-updates/main armhf Packages
Get:14 http://bg.archive.ubuntu.com/ubuntu xenial-updates/universe amd64 Packages [323 kB]
Get:15 http://bg.archive.ubuntu.com/ubuntu xenial-updates/universe i386 Packages [320 kB]
Ign:16 http://bg.archive.ubuntu.com/ubuntu xenial-updates/universe armhf Packages
Ign:17 http://bg.archive.ubuntu.com/ubuntu xenial-updates/multiverse armhf Packages
Err:9 http://bg.archive.ubuntu.com/ubuntu xenial-backports/main armhf Packages
404 Not Found [IP: 195.85.215.252 80]
Ign:10 http://bg.archive.ubuntu.com/ubuntu xenial-backports/universe armhf Packages
Ign:13 http://bg.archive.ubuntu.com/ubuntu xenial-updates/main armhf Packages
Ign:16 http://bg.archive.ubuntu.com/ubuntu xenial-updates/universe armhf Packages
Ign:17 http://bg.archive.ubuntu.com/ubuntu xenial-updates/multiverse armhf Packages
Ign:13 http://bg.archive.ubuntu.com/ubuntu xenial-updates/main armhf Packages
Ign:16 http://bg.archive.ubuntu.com/ubuntu xenial-updates/universe armhf Packages
Ign:17 http://bg.archive.ubuntu.com/ubuntu xenial-updates/multiverse armhf Packages
Err:13 http://bg.archive.ubuntu.com/ubuntu xenial-updates/main armhf Packages
404 Not Found [IP: 195.85.215.252 80]
Ign:16 http://bg.archive.ubuntu.com/ubuntu xenial-updates/universe armhf Packages
Ign:17 http://bg.archive.ubuntu.com/ubuntu xenial-updates/multiverse armhf Packages
Ign:18 http://security.ubuntu.com/ubuntu xenial-security/main armhf Packages
Ign:19 http://security.ubuntu.com/ubuntu xenial-security/universe armhf Packages
Ign:18 http://security.ubuntu.com/ubuntu xenial-security/main armhf Packages
Ign:19 http://security.ubuntu.com/ubuntu xenial-security/universe armhf Packages
Ign:18 http://security.ubuntu.com/ubuntu xenial-security/main armhf Packages
Ign:19 http://security.ubuntu.com/ubuntu xenial-security/universe armhf Packages
Err:18 http://security.ubuntu.com/ubuntu xenial-security/main armhf Packages
404 Not Found [IP: 91.189.91.26 80]
Ign:19 http://security.ubuntu.com/ubuntu xenial-security/universe armhf Packages
Fetched 95,7 kB in 1s (59,8 kB/s)
Reading package lists... Done
E: Failed to fetch http://bg.archive.ubuntu.com/ubuntu/dists/xenial/main/binary-armhf/Packages 404 Not Found [IP: 195.85.215.252 80]
E: Failed to fetch http://bg.archive.ubuntu.com/ubuntu/dists/xenial-backports/main/binary-armhf/Packages 404 Not Found [IP: 195.85.215.252 80]
E: Failed to fetch http://bg.archive.ubuntu.com/ubuntu/dists/xenial-updates/main/binary-armhf/Packages 404 Not Found [IP: 195.85.215.252 80]
E: Failed to fetch http://security.ubuntu.com/ubuntu/dists/xenial-security/main/binary-armhf/Packages 404 Not Found [IP: 91.189.91.26 80]
E: Some index files failed to download. They have been ignored, or old ones used instead.
Unlike Debian, the Ubuntu archives don't have everything in the right place already, in fact non-x86 packages are kept somewhere else altogether. The first thing to do is edit /etc/apt/sources.lst to add ports.ubuntu.com alongside archive.ubuntu.com/ubuntu for the repositories you want, e.g. for:
deb http://bg.archive.ubuntu.com/ubuntu/ xenial main restricted
the equivalent ports repo is:
deb http://bg.ports.ubuntu.com/ xenial main restricted
With those in place,
dpkg --add-architecture armhf
(repeat as appropriate for additional architectures), then updating as usual, does the trick. I've confirmed this on a fresh install of 16.04.1, but I'm pretty sure the same applies as far back as 12.04 too.
Per the multiarch documentation, you can shut the "ignored" and "not found" errors up by restricting entries to the relevant architectures, i.e.:
deb [arch=i386,amd64] http://archive.ubuntu.com...
deb [arch=armhf] http://ports.ubuntu.com...
For reference, Debian's census report has a convenient summary.

unable to install puppetserver on ec2 ubuntu instance error: Some packages could not be installed

I am trying to install Puppet server on an EC2 Ubuntu instance:
ubuntu#ip-172-31-43-240:~$ sudo apt-get install puppetserver
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
puppetserver : Depends: puppet-common (>= 3.7.3-1puppetlabs1) but 3.7.0-1puppetlabs1 is to be installed
Depends: puppet (>= 3.7.3-1puppetlabs1) but 3.7.0-1puppetlabs1 is to be installed
E: Unable to correct problems, you have held broken packages.
ubuntu#ip-172-31-43-240:~$
If I try to install puppet-common:
ubuntu#ip-172-31-43-240:~$ sudo apt-get install puppet-common
Reading package lists... Done
Building dependency tree
Reading state information... Done
puppet-common is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 4 not upgraded.
ubuntu#ip-172-31-43-240:~$
I tried purging puppet-common and reinstalling it. I have also tried sudo apt-get upgrade.
Any help will be appreciated. Thanks.
Have you enabled the PuppetLabs package repositories? Depending on the version of Ubuntu your on, you should do something like this:
curl https://apt.puppetlabs.com/puppetlabs-release-trusty.deb > /tmp/puppetlabs-release-trusty.deb
dpkg -i /tmp/puppetlabs-release-trusty.deb
apt-get update
apt-get -y install puppetserver
I just span up a clean Trusty server and running this script worked for me:
root#trustytest:~# bash install_puppet_server.sh
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 7384 100 7384 0 0 126k 0 --:--:-- --:--:-- --:--:-- 128k
(Reading database ... 153167 files and directories currently installed.)
Preparing to unpack .../puppetlabs-release-trusty.deb ...
Unpacking puppetlabs-release (1.0-11) over (1.0-11) ...
Setting up puppetlabs-release (1.0-11) ...
Ign http://apt.puppetlabs.com trusty InRelease
...trimmed for text limit
Ign http://mirrors.digitalocean.com trusty/main Translation-en_US
Ign http://mirrors.digitalocean.com trusty/multiverse Translation-en_US
Ign http://mirrors.digitalocean.com trusty/restricted Translation-en_US
Ign http://mirrors.digitalocean.com trusty/universe Translation-en_US
Reading package lists... Done
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
linux-headers-3.13.0-57 linux-headers-3.13.0-57-generic
linux-headers-3.13.0-61 linux-headers-3.13.0-61-generic
linux-image-3.13.0-57-generic linux-image-3.13.0-61-generic
linux-image-extra-3.13.0-57-generic linux-image-extra-3.13.0-61-generic
Use 'apt-get autoremove' to remove them.
The following extra packages will be installed:
augeas-lenses ca-certificates-java debconf-utils facter fontconfig-config
fonts-dejavu-core hiera java-common libasyncns0 libaugeas-ruby libaugeas0
libavahi-client3 libavahi-common-data libavahi-common3 libcups2 libflac8
libfontconfig1 libjpeg-turbo8 libjpeg8 liblcms2-2 libnspr4 libnss3
libnss3-nssdb libogg0 libpulse0 libruby1.9.1 libsctp1 libsndfile1
libvorbis0a libvorbisenc2 lksctp-tools openjdk-7-jre-headless puppet
puppet-common ruby ruby-augeas ruby-json ruby-shadow ruby1.9.1 tzdata-java
virt-what
Suggested packages:
augeas-doc default-jre equivs augeas-tools cups-common liblcms2-utils
pulseaudio icedtea-7-jre-jamvm libnss-mdns sun-java6-fonts
fonts-dejavu-extra fonts-ipafont-gothic fonts-ipafont-mincho
ttf-wqy-microhei ttf-wqy-zenhei ttf-indic-fonts-core ttf-telugu-fonts
ttf-oriya-fonts ttf-kannada-fonts ttf-bengali-fonts puppet-el vim-puppet
ruby-selinux libselinux-ruby1.8 librrd-ruby1.9.1 librrd-ruby1.8 ri ruby-dev
ruby1.9.1-examples ri1.9.1 graphviz ruby1.9.1-dev
Recommended packages:
rdoc
The following NEW packages will be installed:
augeas-lenses ca-certificates-java debconf-utils facter fontconfig-config
fonts-dejavu-core hiera java-common libasyncns0 libaugeas-ruby libaugeas0
libavahi-client3 libavahi-common-data libavahi-common3 libcups2 libflac8
libfontconfig1 libjpeg-turbo8 libjpeg8 liblcms2-2 libnspr4 libnss3
libnss3-nssdb libogg0 libpulse0 libruby1.9.1 libsctp1 libsndfile1
libvorbis0a libvorbisenc2 lksctp-tools openjdk-7-jre-headless puppet
puppet-common puppetserver ruby ruby-augeas ruby-json ruby-shadow ruby1.9.1
tzdata-java virt-what
0 upgraded, 42 newly installed, 0 to remove and 67 not upgraded.
Need to get 89.8 MB of archives.
After this operation, 143 MB of additional disk space will be used.
Get:1 http://apt.puppetlabs.com/ trusty/main facter all 2.4.6-1puppetlabs1 [73.3 kB]
Get:2 http://apt.puppetlabs.com/ trusty/main hiera all 1.3.4-1puppetlabs1 [12.0 kB]
Get:3 http://apt.puppetlabs.com/ trusty/main puppet-common all 3.8.6-1puppetlabs1 [1,269 kB]
Get:4 http://apt.puppetlabs.com/ trusty/main puppet all 3.8.6-1puppetlabs1 [9,310 B]
Get:5 http://apt.puppetlabs.com/ trusty/main puppetserver all 1.1.3-1puppetlabs1 [41.7 MB]
Get:6 http://ppa.launchpad.net/brightbox/ruby-ng/ubuntu/ trusty/main libruby1.9.1 amd64 1:1.9.3.551-2bbox1~trusty1 [2,962 kB]
Get:7 http://mirrors.digitalocean.com/ubuntu/ trusty/main libasyncns0 amd64 0.8-4ubuntu2 [11.9 kB]
Get:8 http://mirrors.digitalocean.com/ubuntu/ trusty/main libavahi-common-data amd64 0.6.31-4ubuntu1 [21.2 kB]
Get:9 http://mirrors.digitalocean.com/ubuntu/ trusty/main libavahi-common3 amd64 0.6.31-4ubuntu1 [21.7 kB]
Get:10 http://mirrors.digitalocean.com/ubuntu/ trusty/main libavahi-client3 amd64 0.6.31-4ubuntu1 [25.1 kB]
Get:11 http://mirrors.digitalocean.com/ubuntu/ trusty-updates/main libcups2 amd64 1.7.2-0ubuntu1.7 [179 kB]
Get:12 http://mirrors.digitalocean.com/ubuntu/ trusty/main libogg0 amd64 1.3.1-1ubuntu1 [17.0 kB]
Get:13 http://mirrors.digitalocean.com/ubuntu/ trusty-updates/main libflac8 amd64 1.3.0-2ubuntu0.14.04.1 [80.2 kB]
Get:14 http://ppa.launchpad.net/brightbox/ruby-ng/ubuntu/ trusty/main ruby1.9.1 amd64 1:1.9.3.551-2bbox1~trusty1 [236 kB]
Get:15 http://mirrors.digitalocean.com/ubuntu/ trusty/main fonts-dejavu-core all 2.34-1ubuntu1 [1,024 kB]
Get:16 http://mirrors.digitalocean.com/ubuntu/ trusty-updates/main fontconfig-config all 2.11.0-0ubuntu4.1 [47.4 kB]
...trimmed for text limit
Processing triggers for ureadahead (0.100.0-16) ...
Hey presto, installed!
root#trustytest:~# puppetserver --version
puppetserver version: 1.1.3

Resources