Installing software in kubuntu [closed] - linux

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 9 years ago.
Improve this question
I have recently installed kubuntu. I am able to install softwares from muon software center. But when I try to do so from the terminal, I get errors. For instance on trying to update, I get:
Err http://archive.canonical.com quantal InRelease
Err http://archive.canonical.com quantal Release.gpg
Unable to connect to archive.canonical.com:http:
Err http://archive.ubuntu.com quantal InRelease
Err http://archive.ubuntu.com quantal Release.gpg
Unable to connect to archive.ubuntu.com:http: [IP: 91.189.92.201 80]
Reading package lists... Done
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/quantal/InRelease
W: Failed to fetch http://archive.canonical.com/dists/quantal/InRelease
W: Failed to fetch http://archive.canonical.com/dists/quantal/Release.gpg Unable to connect to archive.canonical.com:http:
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/quantal/Release.gpg Unable to connect to archive.ubuntu.com:http: [IP: 91.189.92.201 80]
W: Some index files failed to download. They have been ignored, or old ones used instead.
Similarly when I try to install git-core, I get:
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
git git-man liberror-perl
Suggested packages:
git-daemon-run git-daemon-sysvinit git-doc git-el git-arch git-cvs git-svn
git-email git-gui gitk gitweb
The following NEW packages will be installed:
git git-core git-man liberror-perl
0 upgraded, 4 newly installed, 0 to remove and 0 not upgraded.
Need to get 6,704 kB of archives.
After this operation, 15.4 MB of additional disk space will be used.
Do you want to continue [Y/n]? y
Err http://archive.ubuntu.com/ubuntu/ quantal/main liberror-perl all 0.17-1
Could not connect to archive.ubuntu.com:80 (91.189.92.202). - connect (111: Connection refused) [IP: 91.189.92.202 80]
Err http://archive.ubuntu.com/ubuntu/ quantal/main git-man all 1:1.7.10.4-1ubuntu1
Unable to connect to archive.ubuntu.com:http: [IP: 91.189.92.202 80]
Err http://archive.ubuntu.com/ubuntu/ quantal/main git i386 1:1.7.10.4-1ubuntu1
Unable to connect to archive.ubuntu.com:http: [IP: 91.189.92.202 80]
Err http://archive.ubuntu.com/ubuntu/ quantal/main git-core all 1:1.7.10.4-1ubuntu1
Unable to connect to archive.ubuntu.com:http: [IP: 91.189.92.202 80]
Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/libe/liberror-perl/liberror-perl_0.17-1_all.deb Could not connect to archive.ubuntu.com:80 (91.189.92.202). - connect (111: Connection refused) [IP: 91.189.92.202 80]
Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/g/git/git-man_1.7.10.4-1ubuntu1_all.deb Unable to connect to archive.ubuntu.com:http: [IP: 91.189.92.202 80]
Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/g/git/git_1.7.10.4-1ubuntu1_i386.deb Unable to connect to archive.ubuntu.com:http: [IP: 91.189.92.202 80]
Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/g/git/git-core_1.7.10.4-1ubuntu1_all.deb Unable to connect to archive.ubuntu.com:http: [IP: 91.189.92.202 80]
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
How do I handle this. I am using internet behind a proxy server, if that matters.

You should add your proxy config to /etc/apt/apt.conf
Acquire::http::Proxy "http://proxy-ip-or-hostname:port";
eg:
Acquire::http::Proxy "http://192.168.0.1:3128";
or with authentication
Acquire::http::Proxy "http://user:pass#192.168.0.1:3128";

Related

"apt update" fails in jupyter/tensorflow-notebook CLI

I'm running a jupyter/tensorflow-notebook container and I need to install a library which needs requires an apt update followed by an apt install build-essential prior to installation.
When I run the command in the CLI for the container I get the following error:
Err:1 http://security.ubuntu.com/ubuntu focal-security InRelease
Could not connect to security.ubuntu.com:80 (91.189.91.38), connection timed out Could not connect to security.ubuntu.com:80 (91.189.91.39), connection timed out
Err:2 http://archive.ubuntu.com/ubuntu focal InRelease
Could not connect to archive.ubuntu.com:80 (91.189.88.152), connection timed out Could not connect to archive.ubuntu.com:80 (91.189.88.142), connection timed out
Err:3 http://archive.ubuntu.com/ubuntu focal-updates InRelease
Unable to connect to archive.ubuntu.com:http:
Err:4 http://archive.ubuntu.com/ubuntu focal-backports InRelease
Unable to connect to archive.ubuntu.com:http:
Reading package lists... Done
Building dependency tree
Reading state information... Done
All packages are up to date.
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/focal/InRelease Could not connect to archive.ubuntu.com:80 (91.189.88.152), connection timed out Could not connect to archive.ubuntu.com:80 (91.189.88.142), connection timed out
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/focal-updates/InRelease Unable to connect to archive.ubuntu.com:http:
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/focal-backports/InRelease Unable to connect to archive.ubuntu.com:http:
W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/focal-security/InRelease Could not connect to security.ubuntu.com:80 (91.189.91.38), connection timed out Could not connect to security.ubuntu.com:80 (91.189.91.39), connection timed out
W: Some index files failed to download. They have been ignored, or old ones used instead.
#
I was hoping someone may have some insight or advice to offer as I'm completely lost with this one.
I'm pulling what little hair I have out..!

How to solve "No module named _bz2" error?

I'm trying to use s3fs in Python 3.6, using Debian 3.16.51-3.
When I import s3fs:
import s3fs
...
from _bz2 import BZ2Compressor, BZ2Decompressor
ModuleNotFoundError: No module named '_bz2'
Alright, I tried to update/install libbz2-dev, as mentioned in other questions here in SO.
sudo apt-get install libbz2-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
bzip2 bzip2-doc libbz2-1.0
The following NEW packages will be installed:
bzip2-doc libbz2-dev
The following packages will be upgraded:
bzip2 libbz2-1.0
2 upgraded, 2 newly installed, 0 to remove and 151 not upgraded.
Need to get 425 kB of archives.
After this operation, 561 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
Err http://security.debian.org/ jessie/updates/main bzip2 amd64 1.0.6-7+deb8u1
404 Not Found [IP: 151.101.128.204 80]
Err http://security.debian.org/ jessie/updates/main libbz2-1.0 amd64 1.0.6-7+deb8u1
404 Not Found [IP: 151.101.128.204 80]
Err http://security.debian.org/ jessie/updates/main bzip2-doc all 1.0.6-7+deb8u1
404 Not Found [IP: 151.101.128.204 80]
Err http://security.debian.org/ jessie/updates/main libbz2-dev amd64 1.0.6-7+deb8u1
404 Not Found [IP: 151.101.128.204 80]
E: Failed to fetch http://security.debian.org/pool/updates/main/b/bzip2/bzip2_1.0.6-7+deb8u1_amd64.deb 404 Not Found [IP: 151.101.128.204 80]
E: Failed to fetch http://security.debian.org/pool/updates/main/b/bzip2/libbz2-1.0_1.0.6-7+deb8u1_amd64.deb 404 Not Found [IP: 151.101.128.204 80]
E: Failed to fetch http://security.debian.org/pool/updates/main/b/bzip2/bzip2-doc_1.0.6-7+deb8u1_all.deb 404 Not Found [IP: 151.101.128.204 80]
E: Failed to fetch http://security.debian.org/pool/updates/main/b/bzip2/libbz2-dev_1.0.6-7+deb8u1_amd64.deb 404 Not Found [IP: 151.101.128.204 80]
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
Tried using --fix-missing, but reached the same error. Apparently the files are not available for download (?).
How should I approach this problem? Thanks in advance.

Azure Ubuntu VM docker build apt-get 403 forbidden

I'm trying to configure Docker on an Azure VM (Ubuntu 18.04 LTS). The goal is to use Jenkins to deploy my applications to my Kubernetes cluster (following this tutorial).
But when I try to build a docker image inside this VM I got 403 errors during the "RUN apt-get update". While the VM itself can access those urls, it's only during the build of the docker image that I get 403 errors.
Sample of the output :
Err:33 http://archive.ubuntu.com/ubuntu xenial-backports/main amd64 Packages
403 Forbidden [IP: 91.189.88.149 80]
Ign:34 http://archive.ubuntu.com/ubuntu xenial-backports/main all Packages
Ign:35 http://archive.ubuntu.com/ubuntu xenial-backports/restricted amd64 Packages
Ign:36 http://archive.ubuntu.com/ubuntu xenial-backports/restricted all Packages
Ign:37 http://archive.ubuntu.com/ubuntu xenial-backports/universe amd64 Packages
Ign:38 http://archive.ubuntu.com/ubuntu xenial-backports/universe all Packages
Ign:39 http://archive.ubuntu.com/ubuntu xenial-backports/multiverse amd64 Packages
Ign:40 http://archive.ubuntu.com/ubuntu xenial-backports/multiverse all Packages
Reading package lists...
W: The repository 'http://archive.ubuntu.com/ubuntu xenial-updates Release' does not have a Release file.
W: The repository 'http://archive.ubuntu.com/ubuntu xenial-backports Release' does not have a Release file.
E: Failed to fetch http://security.ubuntu.com/ubuntu/dists/xenial-security/main/binary-amd64/Packages 403 Forbidden [IP: 91.189.88.161 80]
E: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/xenial/main/binary-amd64/Packages 403 Forbidden [IP: 91.189.88.149 80]
E: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/xenial-updates/main/binary-amd64/Packages 403 Forbidden [IP: 91.189.88.149 80]
E: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/xenial-backports/main/binary-amd64/Packages 403 Forbidden [IP: 91.189.88.149 80]
I have found some similar questions like this one but none of the answers worked or explains exactly what happens in Azure (firewall or transparent proxy not used properly by the network of docker I guess).
Is there a specific configuration for docker, azure VM, ...?
Thank you.

Failed to download kernel source

Failed to download linux kernel source. What is wrong?
root#vagrant-ubuntu-trusty-64:/vagrant/pkgs# apt-get source linux-image-$(uname -r)
Reading package lists... Done
Building dependency tree
Reading state information... Done
Picking 'linux' as source package instead of 'linux-image-3.13.0-37-generic'
NOTICE: 'linux' packaging is maintained in the 'Git' version control system at:
http://kernel.ubuntu.com/git-repos/ubuntu/ubuntu-trusty.git
Need to get 125 MB of source archives.
Err http://archive.ubuntu.com/ubuntu/ trusty-updates/main linux 3.13.0-40.69 (dsc)
404 Not Found [IP: 91.189.88.149 80]
Get:1 http://archive.ubuntu.com/ubuntu/ trusty-updates/main linux 3.13.0-40.69 (tar) [116 MB]
Err http://archive.ubuntu.com/ubuntu/ trusty-updates/main linux 3.13.0-40.69 (diff)
404 Not Found [IP: 91.189.88.149 80]
Fetched 116 MB in 46s (2,494 kB/s)
E: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/l/linux/linux_3.13.0-40.69.dsc 404 Not Found [IP: 91.189.88.149 80]
E: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/l/linux/linux_3.13.0-40.69.diff.gz 404 Not Found [IP: 91.189.88.149 80]
E: Failed to fetch some archives.
I am using standard Ubuntu 14.04
root#vagrant-ubuntu-trusty-64:/vagrant/pkgs# more /etc/issue
Ubuntu 14.04.1 LTS \n \l
I believe that NOTICE: 'linux' packaging is maintained in the 'Git' version control system at:
http://kernel.ubuntu.com/git-repos/ubuntu/ubuntu-trusty.git is fairly straightforward. If you already have git installed use
git clone http://kernel.ubuntu.com/git-repos/ubuntu/ubuntu-trusty.git
Otherwise, install git first
sudo apt-get install git

Failed installation of GD library on Debian

I am trying to install GD library on my Debian server, but the following error appears:
# apt-get install php5-gd
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
libapache2-mod-php5 libt1-5 php5-common php5-mcrypt php5-mysql
Suggested packages:
php-pear
The following NEW packages will be installed:
libt1-5 php5-gd
The following packages will be upgraded:
libapache2-mod-php5 php5-common php5-mcrypt php5-mysql
4 upgraded, 2 newly installed, 0 to remove and 39 not upgraded.
Need to get 3120kB of archives.
After this operation, 545kB of additional disk space will be used.
Do you want to continue [Y/n]? y
WARNING: The following packages cannot be authenticated!
php5-mysql php5-mcrypt libapache2-mod-php5 php5-common libt1-5 php5-gd
Install these packages without verification [y/N]? y
Err http://security.debian.org lenny/updates/main php5-mysql 5.2.6.dfsg.1-1+lenny16
404 Not Found [IP: 128.101.240.212 80]
Err http://security.debian.org lenny/updates/main php5-mcrypt 5.2.6.dfsg.1-1+lenny16
404 Not Found [IP: 128.101.240.212 80]
Err http://security.debian.org lenny/updates/main libapache2-mod-php5 5.2.6.dfsg.1-1+lenny16
404 Not Found [IP: 128.101.240.212 80]
Err http://security.debian.org lenny/updates/main php5-common 5.2.6.dfsg.1-1+lenny16
404 Not Found [IP: 128.101.240.212 80]
Err http://security.debian.org lenny/updates/main libt1-5 5.1.2-3+lenny1
404 Not Found [IP: 128.101.240.212 80]
Err http://security.debian.org lenny/updates/main php5-gd 5.2.6.dfsg.1-1+lenny16
404 Not Found [IP: 128.101.240.212 80]
Failed to fetch http://security.debian.org/pool/updates/main/p/php5/php5-mysql_5.2.6.dfsg.1-1+lenny16_i386.deb 404 Not Found [IP: 128.101.240.212 80]
Failed to fetch http://security.debian.org/pool/updates/main/p/php5/php5-mcrypt_5.2.6.dfsg.1-1+lenny16_i386.deb 404 Not Found [IP: 128.101.240.212 80]
Failed to fetch http://security.debian.org/pool/updates/main/p/php5/libapache2-mod-php5_5.2.6.dfsg.1-1+lenny16_i386.deb 404 Not Found [IP: 128.101.240.212 80]
Failed to fetch http://security.debian.org/pool/updates/main/p/php5/php5-common_5.2.6.dfsg.1-1+lenny16_i386.deb 404 Not Found [IP: 128.101.240.212 80]
Failed to fetch http://security.debian.org/pool/updates/main/t/t1lib/libt1-5_5.1.2-3+lenny1_i386.deb 404 Not Found [IP: 128.101.240.212 80]
Failed to fetch http://security.debian.org/pool/updates/main/p/php5/php5-gd_5.2.6.dfsg.1-1+lenny16_i386.deb 404 Not Found [IP: 128.101.240.212 80]
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
I get a different IP for security.debian.org (195.20.242.89). Flush the DNS cache and try again, it's possible that they've moved IPs:
/etc/rc.d/init.d/nscd restart
And then follow the instructions and run
apt-get update
Before trying to install it again

Resources