Linking boost_system when configured with apt-get install? - linux

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

Related

The command '/bin/sh -c apt-get update && apt-get upgrade' returned a non-zero code: 1

I do get the error message below, while trying to build an Image from a dockerfile.
Any suggestions?
Error Message:
The command '/bin/sh -c apt-get update && apt-get upgrade' returned a non-zero code: 1
Dockerfile screenshot
FROM ubuntu
Maintainer ......
RUN apt-get update && apt-get upgrade
CMD ["echo", "Hello World! from my first docker inage"]
After running the build command screenshot
Sending build context to Docker daemon 3.072kB
Step 1/4: FROM ubuntu
2dc39ba059dc
step 2/4: Maintainer ......
Using cache
-cdea9811b463
Step 3/4 RUN apt-get update 8& apt-get upgrade
Running in 34e13241a292
Get:1 http://archive. ubuntu.con/ubuntu janmy InRe lease [270 kBJ
Get:2 http://security. ubuntu.com/ubuntu jammy- security InRelease [110 kB]
Get:3 http://archive.ubuntu.com/ubuntu janmy-updates InRelease [114 kB]
Get:4 http://archive.ubuntu.coM/ubuntu jammy-backportS INRelease [99.8 kB]
Get:5 http://archive.ubuntu. com/ubuntu jamny/universe and 64 Packages [17.5 MB]
Get:6 http://security.ubuntu.com/ubuntu jamny- security/restrieted amd64 Packages |353 KB]
Get:7 http://security. ubuntu .com/ubuntu jamny-security/universe amd64 Packages [148 kB]
Get:8 http://security.ubuntu .com/ubuntu jamny-security/main amd 64 Packages |372 kB]
Get:9 http://security.ubuntu.com/ubuntu jamny-security/multiverse amd64 Packages [4644 B]
Get:10 http://archive. ubuntu.com/ubuntu jammy/restricted amd64 Packages [164 kB]
Get:11 http://archive. ubuntu .com/ubuntu Jamny/maln amd64 PackageS |1792 KBJ
Get:12 http:://archive.ubuntu .com/ubuntu jamny/multiverse amdő4 Packages [266 kB]
Get:13 http://archive. ubuntu.com/ubuntu jamny- updates /multiverse and64 Packages [7791 B]
Get:14 http://archive. ubuntu.com/ubuntu jammy-updates/main amd 64 Packages [694 kB]
Get: 15 http://archive. ubuntu.com/ubuntu jamny- updates/restricted and 64 Packages [394 kB]
Get:16 http://archive.ubuntu. com/ubuntu jamny-updates/untverse and64 Packages 325 KB]
Get:17 http://archive. ubuntu.com/ubuntu jamny-backports/main amdó4 Packages [3175 B]I
Get:18 http://archive. ubuntu.com/ubuntu jammy- backports/universe amd64 Packages [7285 B]
Fetched 22.6 MB in 7s (3094 kB/s)
Reading package lists...
Reading package lists...
Building dependency tree.
Reading state information...
Galculating upgrade..
The following packages will be upgraded :
zlib1g
1 upgraded, 0 newly installed, 6 to remove and o not upgraded.
Need to get 58.4 KB of archives.
After this operation, 0 B off additional disk space will be used.
Do you want to continue? [Y/n] Abort.
The comnand /bin/sh -C apt-get update && apt-get upgrade' returned a non -zero code: 1
From the screenshot it looks like that apt-get upgrade was aborted. To automatically confirm apt-get's Y/n prompts, you can specify -y flag.
So change RUN line in your Dockerfile to apt-get update && apt-get -y upgrade
-y, --yes, --assume-yes
Automatic yes to prompts; assume "yes" as answer to all prompts and
run non-interactively. If an undesirable situation, such as
changing a held package, trying to install a unauthenticated
package or removing an essential package occurs then apt-get will
abort. Configuration Item: APT::Get::Assume-Yes.

Issues installing gdal-bin (libmysqlclient21 dependency) on 20.04.3 (databricks job clusters)

I've had, in the past, gdal utilities installed successfully on a Databricks Cluster running 20.04.3 LTS (focal).
$ cat /etc/os-release
NAME="Ubuntu"
VERSION="20.04.3 LTS (Focal Fossa)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 20.04.3 LTS"
VERSION_ID="20.04"
$ sudo apt-get install -y gdal-bin
Each time a databricks job cluster startups, my sample notebook attempts to install GDAL. I've attempted a series of apt-get updates/upgrades; and just when I think the issue has gone away; the next day it comes back again (no change of code, cluster spec, etc.)
Most recently the issue occurs once it hits installation for libmysqlclient21, e.g:
Err:27 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 libmysqlclient21 amd64 8.0.26-0ubuntu0.20.04.3
404 Not Found [IP: 91.189.88.142 80]
My understanding is that these issues arise when the packaging versions are no longer supported, and noticed that libmysqlclient21 has come out with a recent patch as of the 25th of October (when the issue started arising).
I've noticed when I run %sh sudo apt-get --fix-missing -y update and apt policy libmysqlclient21, prior to a successful installation, I can see it's found 8.0.27-0ubuntu0.20.04.1:
Get:1 http://security.ubuntu.com/ubuntu focal-security InRelease [114 kB]
Hit:2 http://archive.ubuntu.com/ubuntu focal InRelease
Hit:3 https://repos.azul.com/zulu/deb stable InRelease
Get:4 http://archive.ubuntu.com/ubuntu focal-updates InRelease [114 kB]
Get:5 http://security.ubuntu.com/ubuntu focal-security/restricted amd64 Packages [628 kB]
Get:6 http://archive.ubuntu.com/ubuntu focal-backports InRelease [101 kB]
Get:7 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 Packages [1,635 kB]
Get:8 http://security.ubuntu.com/ubuntu focal-security/universe amd64 Packages [801 kB]
Get:9 http://security.ubuntu.com/ubuntu focal-security/main amd64 Packages [1,183 kB]
Get:10 http://archive.ubuntu.com/ubuntu focal-updates/universe amd64 Packages [1,086 kB]
Get:11 http://archive.ubuntu.com/ubuntu focal-updates/multiverse amd64 Packages [33.4 kB]
Get:12 http://archive.ubuntu.com/ubuntu focal-updates/restricted amd64 Packages [679 kB]
Fetched 6,374 kB in 19s (329 kB/s)
Reading package lists...
libmysqlclient21:
Installed: (none)
Candidate: 8.0.27-0ubuntu0.20.04.1
Version table:
8.0.27-0ubuntu0.20.04.1 500
500 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 Packages
500 http://security.ubuntu.com/ubuntu focal-security/main amd64 Packages
8.0.19-0ubuntu5 500
500 http://archive.ubuntu.com/ubuntu focal/main amd64 Packages
On an unsuccessful run, it's returning:
Hit:1 http://security.ubuntu.com/ubuntu focal-security InRelease
Hit:2 http://archive.ubuntu.com/ubuntu focal InRelease
Hit:3 https://repos.azul.com/zulu/deb stable InRelease
Hit:4 http://archive.ubuntu.com/ubuntu focal-updates InRelease
Hit:5 http://archive.ubuntu.com/ubuntu focal-backports InRelease
Reading package lists...
libmysqlclient21:
Installed: (none)
Candidate: 8.0.26-0ubuntu0.20.04.3
Version table:
8.0.26-0ubuntu0.20.04.3 500
500 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 Packages
8.0.26-0ubuntu0.20.04.2 500
500 http://security.ubuntu.com/ubuntu focal-security/main amd64 Packages
8.0.19-0ubuntu5 500
500 http://archive.ubuntu.com/ubuntu focal/main amd64 Packages
I've been scratching my head trying to understand what could be causing this, and what else to do to work around the problem. I'd prefer it to handle the installation automatically without having to hardcode specific versions (in case other issues were to arise); but not against targeting specific versions if I know they'll be supported on the current platform.
Any advice appreciated.
I had success by putting
sudo apt clean && sudo apt update --fix-missing -y && sudo apt install -y libmysqlclient21
before trying to install gdal and it seems to be working now....
...nevermind began failing the next day again...

Unable to install NodeJS 9 on Ubuntu 16.04 LTS (64bit) [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Closed 5 years ago.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Improve this question
I have tried installing NodeJS by using the following command:
sudo apt-get install nodejs
The problem is, it installs an older version of NodeJS. So I found another way to install a newer version of NodeJS by the following command:
curl -sL https://deb.nodesource.com/setup_9.x | sudo -E bash -
But it keeps throwing me the following error message:
adam#adam-pc:~$ curl -sL https://deb.nodesource.com/setup_9.x | sudo -E bash -
## Installing the NodeSource Node.js v9.x repo...
## Populating apt-get cache...
+ apt-get update
Get:1 http://hu.archive.ubuntu.com/ubuntu xenial InRelease [247 kB]
Hit:2 http://ppa.launchpad.net/git-core/ppa/ubuntu xenial InRelease
Get:3 http://hu.archive.ubuntu.com/ubuntu xenial-updates InRelease [102 kB]
Ign:4 http://dl.google.com/linux/chrome/deb stable InRelease
Get:5 http://hu.archive.ubuntu.com/ubuntu xenial-backports InRelease [102 kB]
Hit:6 http://ppa.launchpad.net/linrunner/tlp/ubuntu xenial InRelease
Hit:7 http://dl.google.com/linux/chrome/deb stable Release
Ign:8 http://ppa.launchpad.net/michael-gruz/canon-trunk/ubuntu xenial InRelease
Hit:9 http://security.ubuntu.com/ubuntu xenial-security InRelease
Hit:10 http://ppa.launchpad.net/webupd8team/sublime-text-3/ubuntu xenial InRelease
Ign:11 http://ppa.launchpad.net/michael-gruz/canon-trunk/ubuntu xenial Release
Ign:12 http://ppa.launchpad.net/michael-gruz/canon-trunk/ubuntu xenial/main amd64 Packages
Ign:13 http://ppa.launchpad.net/michael-gruz/canon-trunk/ubuntu xenial/main i386 Packages
Ign:14 http://ppa.launchpad.net/michael-gruz/canon-trunk/ubuntu xenial/main all Packages
Ign:15 http://ppa.launchpad.net/michael-gruz/canon-trunk/ubuntu xenial/main Translation-en_US
Ign:16 http://ppa.launchpad.net/michael-gruz/canon-trunk/ubuntu xenial/main Translation-en
Ign:17 http://ppa.launchpad.net/michael-gruz/canon-trunk/ubuntu xenial/main amd64 DEP-11 Metadata
Ign:18 http://ppa.launchpad.net/michael-gruz/canon-trunk/ubuntu xenial/main DEP-11 64x64 Icons
Ign:12 http://ppa.launchpad.net/michael-gruz/canon-trunk/ubuntu xenial/main amd64 Packages
Ign:13 http://ppa.launchpad.net/michael-gruz/canon-trunk/ubuntu xenial/main i386 Packages
Ign:14 http://ppa.launchpad.net/michael-gruz/canon-trunk/ubuntu xenial/main all Packages
Ign:15 http://ppa.launchpad.net/michael-gruz/canon-trunk/ubuntu xenial/main Translation-en_US
Ign:16 http://ppa.launchpad.net/michael-gruz/canon-trunk/ubuntu xenial/main Translation-en
Ign:17 http://ppa.launchpad.net/michael-gruz/canon-trunk/ubuntu xenial/main amd64 DEP-11 Metadata
Ign:18 http://ppa.launchpad.net/michael-gruz/canon-trunk/ubuntu xenial/main DEP-11 64x64 Icons
Ign:12 http://ppa.launchpad.net/michael-gruz/canon-trunk/ubuntu xenial/main amd64 Packages
Ign:13 http://ppa.launchpad.net/michael-gruz/canon-trunk/ubuntu xenial/main i386 Packages
Ign:14 http://ppa.launchpad.net/michael-gruz/canon-trunk/ubuntu xenial/main all Packages
Ign:15 http://ppa.launchpad.net/michael-gruz/canon-trunk/ubuntu xenial/main Translation-en_US
Ign:16 http://ppa.launchpad.net/michael-gruz/canon-trunk/ubuntu xenial/main Translation-en
Ign:17 http://ppa.launchpad.net/michael-gruz/canon-trunk/ubuntu xenial/main amd64 DEP-11 Metadata
Ign:18 http://ppa.launchpad.net/michael-gruz/canon-trunk/ubuntu xenial/main DEP-11 64x64 Icons
Ign:12 http://ppa.launchpad.net/michael-gruz/canon-trunk/ubuntu xenial/main amd64 Packages
Ign:13 http://ppa.launchpad.net/michael-gruz/canon-trunk/ubuntu xenial/main i386 Packages
Ign:14 http://ppa.launchpad.net/michael-gruz/canon-trunk/ubuntu xenial/main all Packages
Ign:15 http://ppa.launchpad.net/michael-gruz/canon-trunk/ubuntu xenial/main Translation-en_US
Ign:16 http://ppa.launchpad.net/michael-gruz/canon-trunk/ubuntu xenial/main Translation-en
Ign:17 http://ppa.launchpad.net/michael-gruz/canon-trunk/ubuntu xenial/main amd64 DEP-11 Metadata
Ign:18 http://ppa.launchpad.net/michael-gruz/canon-trunk/ubuntu xenial/main DEP-11 64x64 Icons
Ign:12 http://ppa.launchpad.net/michael-gruz/canon-trunk/ubuntu xenial/main amd64 Packages
Ign:13 http://ppa.launchpad.net/michael-gruz/canon-trunk/ubuntu xenial/main i386 Packages
Ign:14 http://ppa.launchpad.net/michael-gruz/canon-trunk/ubuntu xenial/main all Packages
Ign:15 http://ppa.launchpad.net/michael-gruz/canon-trunk/ubuntu xenial/main Translation-en_US
Ign:16 http://ppa.launchpad.net/michael-gruz/canon-trunk/ubuntu xenial/main Translation-en
Ign:17 http://ppa.launchpad.net/michael-gruz/canon-trunk/ubuntu xenial/main amd64 DEP-11 Metadata
Ign:18 http://ppa.launchpad.net/michael-gruz/canon-trunk/ubuntu xenial/main DEP-11 64x64 Icons
Err:12 http://ppa.launchpad.net/michael-gruz/canon-trunk/ubuntu xenial/main amd64 Packages
404 Not Found
Ign:13 http://ppa.launchpad.net/michael-gruz/canon-trunk/ubuntu xenial/main i386 Packages
Ign:14 http://ppa.launchpad.net/michael-gruz/canon-trunk/ubuntu xenial/main all Packages
Ign:15 http://ppa.launchpad.net/michael-gruz/canon-trunk/ubuntu xenial/main Translation-en_US
Ign:16 http://ppa.launchpad.net/michael-gruz/canon-trunk/ubuntu xenial/main Translation-en
Ign:17 http://ppa.launchpad.net/michael-gruz/canon-trunk/ubuntu xenial/main amd64 DEP-11 Metadata
Ign:18 http://ppa.launchpad.net/michael-gruz/canon-trunk/ubuntu xenial/main DEP-11 64x64 Icons
Fetched 451 kB in 6s (70,4 kB/s)
Reading package lists... Done
W: The repository 'http://ppa.launchpad.net/michael-gruz/canon-trunk/ubuntu xenial Release' does not have a Release file.
N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use.
N: See apt-secure(8) manpage for repository creation and user configuration details.
E: Failed to fetch http://ppa.launchpad.net/michael-gruz/canon-trunk/ubuntu/dists/xenial/main/binary-amd64/Packages 404 Not Found
E: Some index files failed to download. They have been ignored, or old ones used instead.
Error executing command, exiting
I keep looking for a solution for hours now, tried around 10 ideas from StackOverflow and from different forums that I found on Google, but still nothing.
EDIT:
Meanwhile I found the solution.
I opened Ubuntu Update manager by the following command:
update-manager
Then I clicked on Settings and Other software tab and unticked all the http://ppa.launchpad.net/ stuff I found ticked and strange (especially all the michael-gruz links).
Then used the commands above again:
curl -sL https://deb.nodesource.com/setup_9.x | sudo -E bash -
sudo apt-get install nodejs
Now I got v9.5.0 installed.
There's nothing wrong with that install command itself. If you were to look why it errors out, you can see that a launchpad package has gone 404. If you remove this repository, it won't interrupt apt and allow installing the package. You should be able to remove this removed PPA like so:
sudo add-apt-repository --remove ppa:michael-gruz/ppa
I recommend to use a version manager for node. The most popular ones are nvm and n.
Now you can:
sudo apt-get install nodejs // install a really old node
npm install n -g // get n
n latest // get latest node, or a specific one with n v8.0.0

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.

Update library: Boost on Debian 7

I am a newbie on unix systems and I've currently a problem with libs updates.
I don't know really how to update the library Boost to the version 1.55
I tried this way but the boost system version returns 1.48.
$ wget
http://downloads.sourceforge.net/project/boost/boost/1.55.0/boost_1_55_0.tar.gz
$ gunzip boost_1_55_0.tar.gz
$ tar xvf boost_1_55_0.tar
I also tried apt-get update && apt-get upgrade
Then i got some errors:
Get:1 http://http.debian.net wheezy-backports Release.gpg [1,554 B]
Hit http://ftp.debian.org wheezy/main i386 Packages Hit
http://ftp.debian.org wheezy/main Translation-en Get:2
http://http.debian.net wheezy-backports Release [161 kB] Get:3
http://http.debian.net wheezy-backports/main amd64 Packages [606 kB]
Get:4 http://http.debian.net wheezy-backports/main i386 Packages [607
kB] Err http://ppa.launchpad.net wheezy/main Sources 404 Not Found
Err http://ppa.launchpad.net wheezy/main amd64 Packages 404 Not
Found Get:5 http://http.debian.net wheezy-backports/main
Translation-en [376 kB] Err http://ppa.launchpad.net wheezy/main i386
Packages 404 Not Found Ign http://ppa.launchpad.net wheezy/main
Translation-en_GB Ign http://ppa.launchpad.net wheezy/main
Translation-en Fetched 1,752 kB in 1s (896 kB/s) W: Failed to fetch
http://ppa.launchpad.net/boost-latest/ppa/ubuntu/dists/wheezy/main/source/Sources
404 Not Found
W: Failed to fetch
http://ppa.launchpad.net/boost-latest/ppa/ubuntu/dists/wheezy/main/binary-amd64/Packages
404 Not Found
W: Failed to fetch
http://ppa.launchpad.net/boost-latest/ppa/ubuntu/dists/wheezy/main/binary-i386/Packages
404 Not Found
E: Some index files failed to download. They have been ignored, or old
ones used instead. root#vps299256:~# apt-get update && apt-get upgrade
E: Type 'https://packages.debian.org/fr/wheezy/libboost-dev' is not
known on line 3 in source list /etc/apt/sources.list E: The list of
sources could not be read.
Debian 7.11 Wheezy - amd64. Building the 55 libboost1.55 packages :
/etc/apt/sources.lists ... added two lines :
deb-src http://ftp.dk.debian.org/debian/ jessie main
deb-src http://ftp.dk.debian.org/debian/ jessie/updates main
The build-deps ( Summary of 'apt-get build-dep', and then some ) :
# apt-get install g++ fakeroot dctrl-tools libbz2-dev libicu-dev mpi-default-dev bison flex docbook-to-man help2man xsltproc doxygen python-all-dev python3 python3-all-dev debhelper dpkg-dev ... And from [wheezy-backports] : dh-python
Building boost-1.55 in /home/[name]/tmp/boost_1.55/ :
$ apt-get -b source boost1.55=1.55.0+dfsg-3 ... and the libboost 1.55 packages for Debian 7 are created.
The packages (112.5MB) are uploaded as libboost1.55_debian-7.11.tar https://drive.google.com/file/d/0B7S255p3kFXNeGFRZFF6S0g5N3M/view?usp=sharing ... Download, untar with tar xvf libboost1.55_debian-7.11.tar , cd libboost1.55_debian-7.11/, and install with # dpkg -i *.deb

Resources