Cannot install Apache Web Server on Ubuntu, Amazon WS - apache

I enter command apt-get install apache2 --fix-missing (under the root user) and this is what I receive:
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
apache2-mpm-worker apache2-utils apache2.2-bin apache2.2-common libapr1 libaprutil1 libaprutil1-dbd-sqlite3 libaprutil1-ldap
ssl-cert
Suggested packages:
apache2-doc apache2-suexec apache2-suexec-custom openssl-blacklist
The following NEW packages will be installed:
apache2 apache2-mpm-worker apache2-utils apache2.2-bin apache2.2-common libapr1 libaprutil1 libaprutil1-dbd-sqlite3
libaprutil1-ldap ssl-cert
0 upgraded, 10 newly installed, 0 to remove and 36 not upgraded.
Need to get 2,945 kB/3,141 kB of archives.
After this operation, 10.4 MB of additional disk space will be used.
Do you want to continue [Y/n]? y
Err http://us-west-1.ec2.archive.ubuntu.com/ubuntu/ oneiric-updates/main apache2.2-bin i386 2.2.20-1ubuntu1.1
404 Not Found [IP: 10.161.51.124 80]
Err http://security.ubuntu.com/ubuntu/ oneiric-security/main apache2.2-bin i386 2.2.20-1ubuntu1.1
404 Not Found [IP: 91.189.92.167 80]
Err http://security.ubuntu.com/ubuntu/ oneiric-security/main apache2-utils i386 2.2.20-1ubuntu1.1
404 Not Found [IP: 91.189.92.167 80]
Err http://security.ubuntu.com/ubuntu/ oneiric-security/main apache2.2-common i386 2.2.20-1ubuntu1.1
404 Not Found [IP: 91.189.92.167 80]
Err http://security.ubuntu.com/ubuntu/ oneiric-security/main apache2-mpm-worker i386 2.2.20-1ubuntu1.1
404 Not Found [IP: 91.189.92.167 80]
Err http://security.ubuntu.com/ubuntu/ oneiric-security/main apache2 i386 2.2.20-1ubuntu1.1
404 Not Found [IP: 91.189.92.167 80]
Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/a/apache2/apache2.2-bin_2.2.20-1ubuntu1.1_i386.deb 404 Not Found [IP: 91.189.92.167 80]
Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/a/apache2/apache2-utils_2.2.20-1ubuntu1.1_i386.deb 404 Not Found [IP: 91.189.92.167 80]
Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/a/apache2/apache2.2-common_2.2.20-1ubuntu1.1_i386.deb 404 Not Found [IP: 91.189.92.167 80]
Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/a/apache2/apache2-mpm-worker_2.2.20-1ubuntu1.1_i386.deb 404 Not Found [IP: 91.189.92.167 80]
Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/a/apache2/apache2_2.2.20-1ubuntu1.1_i386.deb 404 Not Found [IP: 91.189.92.167 80]
Unable to correct missing packages.
E: Aborting install.
Any help is appreciated.

Try running the following command beforehand:
sudo apt-get update
Depending on your installation, you might also want to run
sudo apt-get upgrade
to install package updates.

Related

Selenium + Google Colab error: 'chromedriver' executable needs to be in PATH

I'm using the code offered by #korakot-chaovavanich in this thread How to use Selenium on Colaboratory Google?. I really need to have a solution to make it work on Google Colab.
# install chromium, its driver, and selenium
!apt install chromium-chromedriver
!cp /usr/lib/chromium-browser/chromedriver /usr/bin
!pip install selenium
# set options to be headless, ..
from selenium import webdriver
options = webdriver.ChromeOptions()
options.add_argument('--headless')
options.add_argument('--no-sandbox')
options.add_argument('--disable-dev-shm-usage')
# open it, go to a website, and get results
wd = webdriver.Chrome('chromedriver',options=options)
wd.get("https://www.google.com")
print(wd.page_source) # results
I've tested in Google Colab, but I have no idea why it fails to work. I tried to look under /usr/lib but I couldn't find any "chromium-browser" folder. I can't figure where chromedriver is being installed to in Google Colab.
Error message from executing this code in Google Colab:
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following package was automatically installed and is no longer required:
libnvidia-common-410
Use 'apt autoremove' to remove it.
The following additional packages will be installed:
chromium-browser chromium-browser-l10n chromium-codecs-ffmpeg-extra
Suggested packages:
webaccounts-chromium-extension unity-chromium-extension adobe-flashplugin
The following NEW packages will be installed:
chromium-browser chromium-browser-l10n chromium-chromedriver
chromium-codecs-ffmpeg-extra
0 upgraded, 4 newly installed, 0 to remove and 16 not upgraded.
Need to get 68.5 MB of archives.
After this operation, 251 MB of additional disk space will be used.
Ign:1 http://archive.ubuntu.com/ubuntu bionic-updates/universe amd64 chromium-codecs-ffmpeg-extra amd64 74.0.3729.169-0ubuntu0.18.04.1
Ign:2 http://archive.ubuntu.com/ubuntu bionic-updates/universe amd64 chromium-browser amd64 74.0.3729.169-0ubuntu0.18.04.1
Ign:3 http://archive.ubuntu.com/ubuntu bionic-updates/universe amd64 chromium-browser-l10n all 74.0.3729.169-0ubuntu0.18.04.1
Ign:4 http://archive.ubuntu.com/ubuntu bionic-updates/universe amd64 chromium-chromedriver amd64 74.0.3729.169-0ubuntu0.18.04.1
Err:1 http://security.ubuntu.com/ubuntu bionic-updates/universe amd64 chromium-codecs-ffmpeg-extra amd64 74.0.3729.169-0ubuntu0.18.04.1
404 Not Found [IP: 91.189.88.31 80]
Err:2 http://security.ubuntu.com/ubuntu bionic-updates/universe amd64 chromium-browser amd64 74.0.3729.169-0ubuntu0.18.04.1
404 Not Found [IP: 91.189.88.31 80]
Err:3 http://security.ubuntu.com/ubuntu bionic-updates/universe amd64 chromium-browser-l10n all 74.0.3729.169-0ubuntu0.18.04.1
404 Not Found [IP: 91.189.88.31 80]
Err:4 http://security.ubuntu.com/ubuntu bionic-updates/universe amd64 chromium-chromedriver amd64 74.0.3729.169-0ubuntu0.18.04.1
404 Not Found [IP: 91.189.88.31 80]
E: Failed to fetch http://security.ubuntu.com/ubuntu/pool/universe/c/chromium-browser/chromium-codecs-ffmpeg-extra_74.0.3729.169-0ubuntu0.18.04.1_amd64.deb 404 Not Found [IP: 91.189.88.31 80]
E: Failed to fetch http://security.ubuntu.com/ubuntu/pool/universe/c/chromium-browser/chromium-browser_74.0.3729.169-0ubuntu0.18.04.1_amd64.deb 404 Not Found [IP: 91.189.88.31 80]
E: Failed to fetch http://security.ubuntu.com/ubuntu/pool/universe/c/chromium-browser/chromium-browser-l10n_74.0.3729.169-0ubuntu0.18.04.1_all.deb 404 Not Found [IP: 91.189.88.31 80]
E: Failed to fetch http://security.ubuntu.com/ubuntu/pool/universe/c/chromium-browser/chromium-chromedriver_74.0.3729.169-0ubuntu0.18.04.1_amd64.deb 404 Not Found [IP: 91.189.88.31 80]
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
cp: cannot stat '/usr/lib/chromium-browser/chromedriver': No such file or directory
Requirement already satisfied: selenium in /usr/local/lib/python3.6/dist-packages (3.141.0)
Requirement already satisfied: urllib3 in /usr/local/lib/python3.6/dist-packages (from selenium) (1.24.3)
---------------------------------------------------------------------------
FileNotFoundError Traceback (most recent call last)
/usr/local/lib/python3.6/dist-packages/selenium/webdriver/common/service.py in start(self)
75 stderr=self.log_file,
---> 76 stdin=PIPE)
77 except TypeError:
4 frames
FileNotFoundError: [Errno 2] No such file or directory: 'chromedriver': 'chromedriver'
During handling of the above exception, another exception occurred:
WebDriverException Traceback (most recent call last)
/usr/local/lib/python3.6/dist-packages/selenium/webdriver/common/service.py in start(self)
81 raise WebDriverException(
82 "'%s' executable needs to be in PATH. %s" % (
---> 83 os.path.basename(self.path), self.start_error_message)
84 )
85 elif err.errno == errno.EACCES:
WebDriverException: Message: 'chromedriver' executable needs to be in PATH. Please see https://sites.google.com/a/chromium.org/chromedriver/home
The problem comes from a version mismatch between Google Chrome and Chromium Browser, leading to the command apt install chromium-chromedriver to fail. It is probably due to an update from Selenium.
You need to update every packages with the command apt-get update, to avoid version mismatch of your tools.
Try this on colab:
# install chromium, its driver, and selenium
!apt-get update
!apt install chromium-chromedriver
!cp /usr/lib/chromium-browser/chromedriver /usr/bin
!pip install selenium
# set options to be headless, ..
from selenium import webdriver
options = webdriver.ChromeOptions()
options.add_argument('--headless')
options.add_argument('--no-sandbox')
options.add_argument('--disable-dev-shm-usage')
# open it, go to a website, and get results
wd = webdriver.Chrome('chromedriver',options=options)
wd.get("https://www.website.com")
print(wd.page_source) # results

when i am trying to install npm it says : 404 Not Found [IP: 91.189.88.149 80] what to do?

Following comes when i am trying to install npm
Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/o/openssl/libssl-dev_1.0.2d-0ubuntu1.5_amd64.deb 404 Not Found [IP: 91.189.88.149 80]
Please update your package list: apt-get update
The current version of libssl-dev is 1.0.2g-1ubuntu4.11 (See Ubuntu Packages).
Old versions of packages will be deleted from the ubuntu repository once they are out-of-date long enough. After pulling the new package info, the package manager will install the new version.

Compilation failure "configure: error: udev support requested but libudev header not installed"

I did following on my ubuntu machine:
Git clone https://github.com/libusb/libusb.git
after extraction, ran ./autogen.sh script, this failed with following error:
checking libudev.h usability... no checking libudev.h presence... no
checking for libudev.h... no configure: error: udev support requested
but libudev header not installed
I also tried installing libudev using following command sudo apt-get install libudev-dev but it fails with following error:
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
libudev1 udev
The following NEW packages will be installed:
libudev-dev
The following packages will be upgraded:
libudev1 udev
2 upgraded, 1 newly installed, 0 to remove and 83 not upgraded.
Need to get 1,197 kB of archives.
After this operation, 539 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
Err:1 http://in.archive.ubuntu.com/ubuntu xenial-updates/main amd64 udev amd64 229-4ubuntu17
404 Not Found [IP: 91.189.88.162 80]
Err:2 http://in.archive.ubuntu.com/ubuntu xenial-updates/main amd64 libudev1 amd64 229-4ubuntu17
404 Not Found [IP: 91.189.88.162 80]
Err:3 http://in.archive.ubuntu.com/ubuntu xenial-updates/main amd64 libudev-dev amd64 229-4ubuntu17
404 Not Found [IP: 91.189.88.162 80]
Unable to correct missing packages.
E: Failed to fetch http://in.archive.ubuntu.com/ubuntu/pool/main/s/systemd/udev_229-4ubuntu17_amd64.deb 404 Not Found [IP: 91.189.88.162 80]
E: Failed to fetch http://in.archive.ubuntu.com/ubuntu/pool/main/s/systemd/libudev1_229-4ubuntu17_amd64.deb 404 Not Found [IP: 91.189.88.162 80]
E: Failed to fetch http://in.archive.ubuntu.com/ubuntu/pool/main/s/systemd/libudev-dev_229-4ubuntu17_amd64.deb 404 Not Found [IP: 91.189.88.162 80]
E: Aborting install.
Any help would be greatly appreciated. Thanks.
sudo apt install libudev-dev works on Ubuntu 18.04 LTS
I got this to working. First i installed libudev-dev the hardway.
1.wget http://kr.archive.ubuntu.com/ubuntu/pool/main/s/systemd/libudev-dev_204-5ubuntu20_amd64.deb and wget http://kr.archive.ubuntu.com/ubuntu/pool/main/s/systemd/libudev1_204-5ubuntu20_amd64.deb
Installed these packages using sudo dpkg -i <*.deb>
Now, ran ./autogen.sh under libusb folder.
Configuration completed successfully!

Lets Encrypt 403 Error When Installing Certificate

I receive a urllib2.HTTPError: HTTP Error 403: Forbidden error when attempting to install a Lets Encrypt certificate using Certbot. I have been installing certificates using the steps listed in this article for over a year and recently starting running into an issue on many of my servers.
The environment of each of the servers with the issue:
GoDaddy Cloud Server (512MB)
Bitnami Wordpress
Ubuntu 14.04.5 LTS
Python 2.7.6
Here are the outputs when attempting to install a certificate:
sudo ./certbot-auto certonly --webroot -w /opt/bitnami/apps/wordpress/htdocs/ -d xxxxxxxxxxxxx.com
Bootstrapping dependencies for Debian-based OSes... (you can skip this with --no-bootstrap)
Ign http://iad-public-cmh-zone-1.clouds.archive.ubuntu.com trusty InRelease
Get:1 http://iad-public-cmh-zone-1.clouds.archive.ubuntu.com trusty-updates InRelease [65.9 kB]
Hit http://iad-public-cmh-zone-1.clouds.archive.ubuntu.com trusty-backports InRelease
Hit http://iad-public-cmh-zone-1.clouds.archive.ubuntu.com trusty Release.gpg
Get:2 http://iad-public-cmh-zone-1.clouds.archive.ubuntu.com trusty-updates/main Sources [399 kB]
28% [2 Sources 63.9 kB/399 kB 16%] [Waiting for headers] [Waiting for headers]
Hit http://security.ubuntu.com trusty-security InRelease
Hit http://ppa.launchpad.net trusty InRelease
Hit http://security.ubuntu.com trusty-security/main Sources
Get:3 http://iad-public-cmh-zone-1.clouds.archive.ubuntu.com trusty-updates/restricted Sources [6,331 B]
Get:4 http://iad-public-cmh-zone-1.clouds.archive.ubuntu.com trusty-updates/universe Sources [180 kB]
Hit http://ppa.launchpad.net trusty/main amd64 Packages
Get:5 http://iad-public-cmh-zone-1.clouds.archive.ubuntu.com trusty-updates/multiverse Sources [7,764 B]
Get:6 http://iad-public-cmh-zone-1.clouds.archive.ubuntu.com trusty-updates/main amd64 Packages [984 kB]
Hit http://security.ubuntu.com trusty-security/universe Sources
Hit http://ppa.launchpad.net trusty/main i386 Packages
Hit http://ppa.launchpad.net trusty/main Translation-en
Hit http://security.ubuntu.com trusty-security/main amd64 Packages
Hit http://security.ubuntu.com trusty-security/universe amd64 Packages
Hit http://security.ubuntu.com trusty-security/main i386 Packages
Get:7 http://iad-public-cmh-zone-1.clouds.archive.ubuntu.com trusty-updates/restricted amd64 Packages [17.1 kB]
Hit http://security.ubuntu.com trusty-security/universe i386 Packages
Get:8 http://iad-public-cmh-zone-1.clouds.archive.ubuntu.com trusty-updates/universe amd64 Packages [408 kB]
Hit http://security.ubuntu.com trusty-security/main Translation-en
Get:9 http://iad-public-cmh-zone-1.clouds.archive.ubuntu.com trusty-updates/multiverse amd64 Packages [14.3 kB]
Get:10 http://iad-public-cmh-zone-1.clouds.archive.ubuntu.com trusty-updates/main i386 Packages [941 kB]
Hit http://security.ubuntu.com trusty-security/universe Translation-en
Get:11 http://iad-public-cmh-zone-1.clouds.archive.ubuntu.com trusty-updates/restricted i386 Packages [16.9 kB]
Get:12 http://iad-public-cmh-zone-1.clouds.archive.ubuntu.com trusty-updates/universe i386 Packages [408 kB]
Get:13 http://iad-public-cmh-zone-1.clouds.archive.ubuntu.com trusty-updates/multiverse i386 Packages [14.6 kB]
Hit http://iad-public-cmh-zone-1.clouds.archive.ubuntu.com trusty-updates/main Translation-en
Hit http://iad-public-cmh-zone-1.clouds.archive.ubuntu.com trusty-updates/multiverse Translation-en
Hit http://iad-public-cmh-zone-1.clouds.archive.ubuntu.com trusty-updates/restricted Translation-en
Hit http://iad-public-cmh-zone-1.clouds.archive.ubuntu.com trusty-updates/universe Translation-en
Hit http://iad-public-cmh-zone-1.clouds.archive.ubuntu.com trusty Release
Hit http://iad-public-cmh-zone-1.clouds.archive.ubuntu.com trusty-backports/main Sources
Hit http://iad-public-cmh-zone-1.clouds.archive.ubuntu.com trusty-backports/restricted Sources
Hit http://iad-public-cmh-zone-1.clouds.archive.ubuntu.com trusty-backports/universe Sources
Hit http://iad-public-cmh-zone-1.clouds.archive.ubuntu.com trusty-backports/multiverse Sources
Hit http://iad-public-cmh-zone-1.clouds.archive.ubuntu.com trusty-backports/main amd64 Packages
Hit http://iad-public-cmh-zone-1.clouds.archive.ubuntu.com trusty-backports/restricted amd64 Packages
Hit http://iad-public-cmh-zone-1.clouds.archive.ubuntu.com trusty-backports/universe amd64 Packages
Hit http://iad-public-cmh-zone-1.clouds.archive.ubuntu.com trusty-backports/multiverse amd64 Packages
Hit http://iad-public-cmh-zone-1.clouds.archive.ubuntu.com trusty-backports/main i386 Packages
Hit http://iad-public-cmh-zone-1.clouds.archive.ubuntu.com trusty-backports/restricted i386 Packages
Hit http://iad-public-cmh-zone-1.clouds.archive.ubuntu.com trusty-backports/universe i386 Packages
Hit http://iad-public-cmh-zone-1.clouds.archive.ubuntu.com trusty-backports/multiverse i386 Packages
Hit http://iad-public-cmh-zone-1.clouds.archive.ubuntu.com trusty-backports/main Translation-en
Hit http://iad-public-cmh-zone-1.clouds.archive.ubuntu.com trusty-backports/multiverse Translation-en
Hit http://iad-public-cmh-zone-1.clouds.archive.ubuntu.com trusty-backports/restricted Translation-en
Hit http://iad-public-cmh-zone-1.clouds.archive.ubuntu.com trusty-backports/universe Translation-en
Hit http://iad-public-cmh-zone-1.clouds.archive.ubuntu.com trusty/main Sources
Hit http://iad-public-cmh-zone-1.clouds.archive.ubuntu.com trusty/restricted Sources
Hit http://iad-public-cmh-zone-1.clouds.archive.ubuntu.com trusty/universe Sources
Hit http://iad-public-cmh-zone-1.clouds.archive.ubuntu.com trusty/multiverse Sources
Hit http://iad-public-cmh-zone-1.clouds.archive.ubuntu.com trusty/main amd64 Packages
Hit http://iad-public-cmh-zone-1.clouds.archive.ubuntu.com trusty/restricted amd64 Packages
Hit http://iad-public-cmh-zone-1.clouds.archive.ubuntu.com trusty/universe amd64 Packages
Hit http://iad-public-cmh-zone-1.clouds.archive.ubuntu.com trusty/multiverse amd64 Packages
Hit http://iad-public-cmh-zone-1.clouds.archive.ubuntu.com trusty/main i386 Packages
Hit http://iad-public-cmh-zone-1.clouds.archive.ubuntu.com trusty/restricted i386 Packages
Hit http://iad-public-cmh-zone-1.clouds.archive.ubuntu.com trusty/universe i386 Packages
Hit http://iad-public-cmh-zone-1.clouds.archive.ubuntu.com trusty/multiverse i386 Packages
Hit http://iad-public-cmh-zone-1.clouds.archive.ubuntu.com trusty/main Translation-en
Hit http://iad-public-cmh-zone-1.clouds.archive.ubuntu.com trusty/multiverse Translation-en
Hit http://iad-public-cmh-zone-1.clouds.archive.ubuntu.com trusty/restricted Translation-en
Hit http://iad-public-cmh-zone-1.clouds.archive.ubuntu.com trusty/universe Translation-en
Ign http://iad-public-cmh-zone-1.clouds.archive.ubuntu.com trusty/main Translation-en_US
Ign http://iad-public-cmh-zone-1.clouds.archive.ubuntu.com trusty/multiverse Translation-en_US
Ign http://iad-public-cmh-zone-1.clouds.archive.ubuntu.com trusty/restricted Translation-en_US
Ign http://iad-public-cmh-zone-1.clouds.archive.ubuntu.com trusty/universe Translation-en_US
Fetched 3,463 kB in 8s (395 kB/s)
Reading package lists... Done
W: Ignoring Provides line with DepCompareOp for package python-cffi-backend-api-max
W: Ignoring Provides line with DepCompareOp for package python-cffi-backend-api-min
W: Ignoring Provides line with DepCompareOp for package python3-cffi-backend-api-max
W: Ignoring Provides line with DepCompareOp for package python3-cffi-backend-api-min
W: Ignoring Provides line with DepCompareOp for package python-cffi-backend-api-max
W: Ignoring Provides line with DepCompareOp for package python-cffi-backend-api-min
W: Ignoring Provides line with DepCompareOp for package python3-cffi-backend-api-max
W: Ignoring Provides line with DepCompareOp for package python3-cffi-backend-api-min
W: You may want to run apt-get update to correct these problems
Reading package lists... Done
Building dependency tree
Reading state information... Done
gcc is already the newest version.
python is already the newest version.
python-dev is already the newest version.
augeas-lenses is already the newest version.
ca-certificates is already the newest version.
libaugeas0 is already the newest version.
libffi-dev is already the newest version.
libssl-dev is already the newest version.
openssl is already the newest version.
python-virtualenv is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 19 not upgraded.
WARNING: unable to check for updates.
Creating virtual environment...
Running virtualenv with interpreter /usr/bin/python2.7
New python executable in /home/xxxxxxxxxxx/.local/share/letsencrypt/bin/python2.7
Also creating executable in /home/xxxxxxxxxxx/.local/share/letsencrypt/bin/python
Installing setuptools, pip...done.
Installing Python packages...
Traceback (most recent call last):
File "/tmp/tmp.rG5cNt1Qm0/pipstrap.py", line 146, in <module>
exit(main())
File "/tmp/tmp.rG5cNt1Qm0/pipstrap.py", line 130, in main
for url, digest in PACKAGES]
File "/tmp/tmp.rG5cNt1Qm0/pipstrap.py", line 112, in hashed_download
response = opener().open(url)
File "/usr/lib/python2.7/urllib2.py", line 410, in open
response = meth(req, response)
File "/usr/lib/python2.7/urllib2.py", line 523, in http_response
'http', request, response, code, msg, hdrs)
File "/usr/lib/python2.7/urllib2.py", line 448, in error
return self._call_chain(*args)
File "/usr/lib/python2.7/urllib2.py", line 382, in _call_chain
result = func(*args)
File "/usr/lib/python2.7/urllib2.py", line 531, in http_error_default
raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)
urllib2.HTTPError: HTTP Error 403: Forbidden
UPDATE
Here is what happens when I try to download the tar files from pypi.python.org
bitnami#atv-demo:/tmp$ sudo wget https://pypi.python.org/packages/source/p/pip/pip-8.0.3.tar.gz
--2017-06-07 06:58:33-- https://pypi.python.org/packages/source/p/pip/pip-8.0.3.tar.gz
Resolving pypi.python.org (pypi.python.org)... 151.101.32.223, 2a04:4e42:8::223
Connecting to pypi.python.org (pypi.python.org)|151.101.32.223|:443... connected.
HTTP request sent, awaiting response... 403 Forbidden
2017-06-07 06:58:33 ERROR 403: Forbidden.
bitnami#atv-demo:/tmp$ sudo wget https://pypi.python.org/packages/source/s/setuptools/setuptools-20.2.2.tar.gz
--2017-06-07 06:58:41-- https://pypi.python.org/packages/source/s/setuptools/setuptools-20.2.2.tar.gz
Resolving pypi.python.org (pypi.python.org)... 151.101.32.223, 2a04:4e42:8::223
Connecting to pypi.python.org (pypi.python.org)|151.101.32.223|:443... connected.
HTTP request sent, awaiting response... 403 Forbidden
2017-06-07 06:58:41 ERROR 403: Forbidden.
bitnami#atv-demo:/tmp$ sudo wget https://pypi.python.org/packages/source/w/wheel/wheel-0.29.0.tar.gz
--2017-06-07 06:58:48-- https://pypi.python.org/packages/source/w/wheel/wheel-0.29.0.tar.gz
Resolving pypi.python.org (pypi.python.org)... 151.101.32.223, 2a04:4e42:8::223
Connecting to pypi.python.org (pypi.python.org)|151.101.32.223|:443... connected.
HTTP request sent, awaiting response... 403 Forbidden
2017-06-07 06:58:48 ERROR 403: Forbidden.
Bitnami developer here.
According to the traceback you shared, the error occurred while trying to download a Python package. The list of URLs that the script tries to download is:
https://pypi.python.org/packages/source/p/pip/pip-8.0.3.tar.gz
https://pypi.python.org/packages/source/s/setuptools/setuptools-20.2.2.tar.gz
https://pypi.python.org/packages/source/w/wheel/wheel-0.29.0.tar.gz
And optionally:
https://pypi.python.org/packages/source/a/argparse/argparse-1.4.0.tar.gz
Taking into account the URLs point to pypi.python.org, this was probably a transient error.
Alternatively, you may try to install Certbot from the official PPA instead of using certbot-auto.

How to install apache2 in Ubuntu

I am trying to install apache2 in Ubuntu 12. I installed Ubuntu in Virtual Machine. I have problems. First, my system can not update or upgrade. When I type:
I receive a lot of errors like this:
Err http://security.ubuntu.com quantal-security/main Sources
404 Not Found [IP: 91.189.91.14 80]
At the final line, this is the result:
W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/quantal-backports/multiverse/binary-i386/Packages 404 Not Found [IP: 91.189.91.13 80]
E: Some index files failed to download. They have been ignored, or old ones used instead.
Second, when I try to install apache2. I type:
sudo apt-get install apache2 apache2-doc apache2-utils
Again, it fails. The result:
e#ubuntu:/etc$ sudo apt-get install apache2 apache2-doc apache2-utils
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package apache2
E: Unable to locate package apache2-doc
E: Unable to locate package apache2-utils
e#ubuntu:/etc$
Can you help me plz?
EDIT:
This command does not work either.
sudo apt-get update && sudo apt-get upgrade
I get:
W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/quantal-backports/multiverse/binary-i386/Packages 404 Not Found [IP: 91.189.91.24 80]
E: Some index files failed to download. They have been ignored, or old ones used instead.
The problem is with the OS installation.
use sudo apt-get update && sudo apt-get upgrade. If ou cannot update. Then try to re-install the OS.
After a fresh install of your OS try sudo apt-get install apache2 apache2-doc apache2-utils