Error accessing raspbian.raspberrypi.org when downloading packages - raspberry-pi

When I try to install anything on my Raspberry Pi 3 I get the following error message, I don't seem to have any trouble connecting to the Internet, as
ping google.com
and connecting to the pi via ssh work.
Is this a common error or am I missing anything?
admin#raspberrypi:~/Desktop $ sudo apt-get install motion
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following package was automatically installed and is no longer required:
libfuse2
Use 'sudo apt autoremove' to remove it.
The following additional packages will be installed:
libmariadb3 libmicrohttpd12 libpq5 mariadb-common mysql-common
Suggested packages:
default-mysql-client postgresql-client
The following NEW packages will be installed:
libmariadb3 libmicrohttpd12 libpq5 mariadb-common motion mysql-common
0 upgraded, 6 newly installed, 0 to remove and 0 not upgraded.
Need to get 947 kB of archives.
After this operation, 3,651 kB of additional disk space will be used.
Do you want to continue? [Y/n] Y
Get:1 http://raspbian.raspberrypi.org/raspbian bullseye/main armhf mysql-common all 5.8+1.0.7 [7,464 B]
Get:2 http://raspbian.raspberrypi.org/raspbian bullseye/main armhf mariadb-common all 1:10.5.15-0+deb11u1 [36.7 kB]
Err:3 http://raspbian.raspberrypi.org/raspbian bullseye/main armhf libmariadb3 armhf 1:10.5.15-0+deb11u1
Cannot initiate the connection to raspbian.raspberrypi.org:80 (2a00:1098:0:80:1000:75:0:3). - connect (101: Network is unreachable) Could not connect to raspbian.raspberrypi.org:80 (93.93.128.193), connection timed out [IP: 93.93.128.193 80]
Err:4 http://raspbian.raspberrypi.org/raspbian bullseye/main armhf libmicrohttpd12 armhf 0.9.72-2
Cannot initiate the connection to raspbian.raspberrypi.org:80 (2a00:1098:0:80:1000:75:0:3). - connect (101: Network is unreachable) [IP: 93.93.128.193 80]
Err:5 http://raspbian.raspberrypi.org/raspbian bullseye/main armhf libpq5 armhf 13.8-0+deb11u1
Cannot initiate the connection to raspbian.raspberrypi.org:80 (2a00:1098:0:80:1000:75:0:3). - connect (101: Network is unreachable) [IP: 93.93.128.193 80]
Err:6 http://raspbian.raspberrypi.org/raspbian bullseye/main armhf motion armhf 4.3.2-1
Cannot initiate the connection to raspbian.raspberrypi.org:80 (2a00:1098:0:80:1000:75:0:3). - connect (101: Network is unreachable) [IP: 93.93.128.193 80]
Fetched 44.2 kB in 31s (1,438 B/s)
E: Failed to fetch http://raspbian.raspberrypi.org/raspbian/pool/main/m/mariadb-10.5/libmariadb3_10.5.15-0%2bdeb11u1_armhf.deb Cannot initiate the connection to raspbian.raspberrypi.org:80 (2a00:1098:0:80:1000:75:0:3). - connect (101: Network is unreachable) Could not connect to raspbian.raspberrypi.org:80 (93.93.128.193), connection timed out [IP: 93.93.128.193 80]
E: Failed to fetch http://raspbian.raspberrypi.org/raspbian/pool/main/libm/libmicrohttpd/libmicrohttpd12_0.9.72-2_armhf.deb Cannot initiate the connection to raspbian.raspberrypi.org:80 (2a00:1098:0:80:1000:75:0:3). - connect (101: Network is unreachable) [IP: 93.93.128.193 80]
E: Failed to fetch http://raspbian.raspberrypi.org/raspbian/pool/main/p/postgresql-13/libpq5_13.8-0%2bdeb11u1_armhf.deb Cannot initiate the connection to raspbian.raspberrypi.org:80 (2a00:1098:0:80:1000:75:0:3). - connect (101: Network is unreachable) [IP: 93.93.128.193 80]
E: Failed to fetch http://raspbian.raspberrypi.org/raspbian/pool/main/m/motion/motion_4.3.2-1_armhf.deb Cannot initiate the connection to raspbian.raspberrypi.org:80 (2a00:1098:0:80:1000:75:0:3). - connect (101: Network is unreachable) [IP: 93.93.128.193 80]
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?

This link may help. Either the server is dead or ipv6 isn’t working properly.
IPv6 Network is unreachable (os error 101)
Edit: You can try and add ipv6.disable=1 to the GRUB_CMDLINE_LINUX_DEFAULT and GRUB_CMDLINE_LINUX entries in /etc/default/grub.cfg then run sudo update-grub. This way it will default to ipv4 and work properly.

Related

Snappy Mail/Rainloop Authentication failed

I Installed the fresh cyberpanel installation when I created a email with the domain and tried to login with the same it shows
Authentication failed
Server message: AUTHENTICATIONFAILED Authentication failed.
I am using VPS server from contabo:
OS: Ubuntu 18.04 (64 Bit)
Installed Cyperpanel using below command.
sh <(curl https://cyberpanel.net/install.sh || wget -O - https://cyberpanel.net/install.sh)
When I checked for the errors I got below Error:
Sep 14 19:44:42 vmi1011202.contaboserver.net dovecot[733]: auth-worker(1939): Error: sql(admin#innovatelifesciences.org,127.0.0.1,<TgoNr6boGLp/AAAB>): Invalid password in passdb: crypt() failed: Invalid argument
Sep 14 19:44:44 vmi1011202.contaboserver.net dovecot[733]: imap-login: Disconnected (auth failed, 1 attempts in 2 secs): user=admin#innovatelifesciences.org, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, TLS, session=<TgoNr6boGLp/AAAB>
This was because of dovecot version once we upgrade devecot from 2.2.x to 2.3.x it'll work.
Follow below steps.
Add the reposity key of dovecot to the rpm key store:
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 18A348AEED409DA1
Add the official dovecot Ubuntu Repo to sources.list
(this example is for Ubuntu 18)
sudo nano /etc/apt/sources.list.d/dovecot.list
insert into:
deb [arch=amd64] https://repo.dovecot.org/ce-2.3-latest/ubuntu/bionic/ bionic main
Save it and close editor
Do a:
sudo apt update
Do a:
sudo apt dist-upgrade
Reboot your machine.
reboot

brew services start mongodb-community#4.2 Error: Unknown command: services

I am trying to run MongoDB by running brew services start mongodb-community#4.2 but I am getting the error that you see below:
jaimes-mbp:SMR jaimemontoya$ brew services start mongodb-community#4.2
==> Tapping homebrew/services
Cloning into '/usr/local/Library/Taps/homebrew/homebrew-services'...
remote: Enumerating objects: 27, done.
remote: Counting objects: 100% (27/27), done.
remote: Compressing objects: 100% (19/19), done.
remote: Total 27 (delta 0), reused 16 (delta 0), pack-reused 0
Unpacking objects: 100% (27/27), done.
Checking connectivity... done.
Tapped 0 formulae (63 files, 276K)
Error: Unknown command: services
jaimes-mbp:SMR jaimemontoya$
Isn't brew the command, and services only a parameter? I am not understanding why the error says that services is an unknown command. Thank you.
UPDATE 1: I see two warnings when I try to run brew install mongodb-community#4.2 again. Maybe that has something to do with the problem?:
jaimes-mbp:SMR jaimemontoya$ brew install mongodb-community#4.2
Warning: mongodb/brew/mongodb-community-4.2.3 already installed
Warning: You are using OS X 10.15.
We do not provide support for this pre-release version.
You may encounter build failures or other breakages.
UPDATE 2: When I use mongo, it is doing something:
jaimes-mbp:SMR jaimemontoya$ mongo
MongoDB shell version v4.2.3
connecting to: mongodb://127.0.0.1:27017/?compressors=disabled&gssapiServiceName=mongodb
2020-03-13T06:41:22.073-0600 E QUERY [js] Error: couldn't connect to server 127.0.0.1:27017, connection attempt failed: SocketException: Error connecting to 127.0.0.1:27017 :: caused by :: Connection refused :
connect#src/mongo/shell/mongo.js:341:17
#(connect):2:6
2020-03-13T06:41:22.076-0600 F - [main] exception: connect failed
2020-03-13T06:41:22.076-0600 E - [main] exiting with code 1
jaimes-mbp:SMR jaimemontoya$
Maybe I do not need to use brew services start mongodb-community#4.2? I thought it was necessary to run MongoDB Community Edition.
UPDATE 3: I run ps aux | grep -v grep | grep mongod and it returns nothing. I am trying to verify that MongoDB is running, so I am searching for mongod in my running processes but it returns nothing, meaning that MongoDB is not running I guess.
UPDATE 4: See what happens when I run brew doctor --verbose:
Warning: You are using OS X 10.15.
We do not provide support for this pre-release version.
You may encounter build failures or other breakages.
Warning: Your Homebrew is outdated.
You haven't updated for at least 24 hours. This is a long time in brewland!
To update Homebrew, run `brew update`.
Warning: The /usr/local directory is not writable.
Even if this directory was writable when you installed Homebrew, other
software may change permissions on this directory. Some versions of the
"InstantOn" component of Airfoil are known to do this.
You should probably change the ownership and permissions of /usr/local
back to your user account.
sudo chown -R $(whoami):admin /usr/local
When I run sudo chown -R $(whoami):admin /usr/local, I get this:
jaimes-mbp:SMR jaimemontoya$ sudo chown -R $(whoami):admin /usr/local
Password:
chown: /usr/local: Operation not permitted
jaimes-mbp:SMR jaimemontoya$
brew update is not working:
jaimes-mbp:SMR jaimemontoya$ brew update
Error: The /usr/local directory is not writable.
Even if this directory was writable when you installed Homebrew, other
software may change permissions on this directory. Some versions of the
"InstantOn" component of Airfoil are known to do this.
You should probably change the ownership and permissions of /usr/local
back to your user account.
sudo chown -R $(whoami):admin /usr/local
jaimes-mbp:SMR jaimemontoya$
Seems like you are facing issue with brew.
Run brew doctor --verbose to check if the brew is working fine.
And then brew update to update the brew version.
After this run, brew services list to display all the services in the brew.
If you see mongodb-community#4.2 there in the list, then run brew services start mongodb-community#4.2
It should work.
I followed the advice MikeMcQuaid provided at https://github.com/Homebrew/brew/issues/3665:
You need to uninstall and install Homebrew using
https://github.com/Homebrew/install
As explained at https://github.com/Homebrew/install, I first ran /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/uninstall)". After that I ran /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)".
Then I ran this:
jaimes-mbp:SMR jaimemontoya$ brew tap mongodb/brew
Updating Homebrew...
==> Auto-updated Homebrew!
Updated 1 tap (homebrew/core).
No changes to formulae.
==> Tapping mongodb/brew
Cloning into '/usr/local/Homebrew/Library/Taps/mongodb/homebrew-brew'...
remote: Enumerating objects: 86, done.
remote: Counting objects: 100% (86/86), done.
remote: Compressing objects: 100% (76/76), done.
remote: Total 145 (delta 41), reused 21 (delta 10), pack-reused 59
Receiving objects: 100% (145/145), 30.18 KiB | 2.16 MiB/s, done.
Resolving deltas: 100% (68/68), done.
Tapped 6 formulae (33 files, 83.0KB).
jaimes-mbp:SMR jaimemontoya$ brew install mongodb-community#4.2
==> Installing mongodb-community from mongodb/brew
==> Downloading https://fastdl.mongodb.org/osx/mongodb-macos-x86_64-4.2.3.tgz
######################################################################## 100.0%
==> Caveats
To have launchd start mongodb/brew/mongodb-community now and restart at login:
brew services start mongodb/brew/mongodb-community
Or, if you don't want/need a background service you can just run:
mongod --config /usr/local/etc/mongod.conf
==> Summary
🍺 /usr/local/Cellar/mongodb-community/4.2.3: 21 files, 304.3MB, built in 1 minute 54 seconds
jaimes-mbp:SMR jaimemontoya$ brew services start mongodb-community#4.2
==> Tapping homebrew/services
Cloning into '/usr/local/Homebrew/Library/Taps/homebrew/homebrew-services'...
remote: Enumerating objects: 88, done.
remote: Counting objects: 100% (88/88), done.
remote: Compressing objects: 100% (47/47), done.
remote: Total 691 (delta 31), reused 69 (delta 25), pack-reused 603
Receiving objects: 100% (691/691), 192.79 KiB | 1.68 MiB/s, done.
Resolving deltas: 100% (270/270), done.
Tapped 1 command (39 files, 266.3KB).
==> Successfully started `mongodb-community` (label: homebrew.mxcl.mongodb-community)
jaimes-mbp:SMR jaimemontoya$ ps aux | grep -v grep | grep mongod
jaimemontoya 17763 0.1 0.2 5544164 38300 ?? S 8:11AM 0:00.65 /usr/local/opt/mongodb-community/bin/mongod --config /usr/local/etc/mongod.conf
jaimes-mbp:SMR jaimemontoya$
It works!

AWS ECS task can't access outbound

I created docker image that based on ubuntu:18.04
Maybe I think ECS task cannot access to outbound.
When I execute apt-get update, it throw errors.
root#ip-172-31-14-71:~# apt-get install -y wget
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
libpsl5 publicsuffix
The following NEW packages will be installed:
libpsl5 publicsuffix wget
0 upgraded, 3 newly installed, 0 to remove and 2 not upgraded.
Need to get 455 kB of archives.
After this operation, 1320 kB of additional disk space will be used.
Err:1 http://archive.ubuntu.com/ubuntu bionic/main amd64 libpsl5 amd64 0.19.1-5build1
Could not connect to archive.ubuntu.com:80 (91.189.88.162), connection timed out Could not connect to archive.ubuntu.com:80 (91.189.88.149), connection timed out 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.161), connection timed out
Err:2 http://archive.ubuntu.com/ubuntu bionic/main amd64 publicsuffix all 20180223.1310-1
Unable to connect to archive.ubuntu.com:http:
Ign:3 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 wget amd64 1.19.4-1ubuntu2.2
Err:3 http://security.ubuntu.com/ubuntu bionic-updates/main amd64 wget amd64 1.19.4-1ubuntu2.2
Unable to connect to archive.ubuntu.com:http:
E: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/libp/libpsl/libpsl5_0.19.1-5build1_amd64.deb Could not connect to archive.ubuntu.com:80 (91.189.88.162), connection timed out Could not connect to archive.ubuntu.com:80 (91.189.88.149), connection timed out 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.161), connection timed out
E: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/p/publicsuffix/publicsuffix_20180223.1310-1_all.deb Unable to connect to archive.ubuntu.com:http:
E: Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/w/wget/wget_1.19.4-1ubuntu2.2_amd64.deb Unable to connect to archive.ubuntu.com:http:
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
root#ip-172-31-14-71:~# apt-get install -y wget
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
libpsl5 publicsuffix
The following NEW packages will be installed:
libpsl5 publicsuffix wget
0 upgraded, 3 newly installed, 0 to remove and 2 not upgraded.
Need to get 455 kB of archives.
After this operation, 1320 kB of additional disk space will be used.
Err:1 http://archive.ubuntu.com/ubuntu bionic/main amd64 libpsl5 amd64 0.19.1-5build1
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.161), connection timed out Could not connect to archive.ubuntu.com:80 (91.189.88.162), connection timed out Could not connect to archive.ubuntu.com:80 (91.189.88.149), connection timed out
Err:2 http://archive.ubuntu.com/ubuntu bionic/main amd64 publicsuffix all 20180223.1310-1
Unable to connect to archive.ubuntu.com:http:
Ign:3 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 wget amd64 1.19.4-1ubuntu2.2
Err:3 http://security.ubuntu.com/ubuntu bionic-updates/main amd64 wget amd64 1.19.4-1ubuntu2.2
Unable to connect to archive.ubuntu.com:http:
E: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/libp/libpsl/libpsl5_0.19.1-5build1_amd64.deb 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.161), connection timed out Could not connect to archive.ubuntu.com:80 (91.189.88.162), connection timed out Could not connect to archive.ubuntu.com:80 (91.189.88.149), connection timed out
E: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/p/publicsuffix/publicsuffix_20180223.1310-1_all.deb Unable to connect to archive.ubuntu.com:http:
E: Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/w/wget/wget_1.19.4-1ubuntu2.2_amd64.deb Unable to connect to archive.ubuntu.com:http:
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
wget to google.com also failed.
I do not configure any firewalls or related about that.
Is there any configuration for ECS task?

error while running the comannd 'psql' Error: You must install at least one postgresql-client-<version> package

When I run vagrant ssh and login successfully then try the ~$psql command, I get this error: Error: You must install at least one postgresql-client-<version> package.
I saw a similar question here and I ran this command:
~$ sudo apt-get install postgresql-client
The output:
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
libpq5 postgresql-client-9.1
Suggested packages:
postgresql-9.1 postgresql-doc-9.1
The following NEW packages will be installed:
libpq5 postgresql-client postgresql-client-9.1
0 upgraded, 3 newly installed, 0 to remove and 66 not upgraded.
Need to get 1,057 kB/1,063 kB of archives.
After this operation, 3,448 kB of additional disk space will be used.
Do you want to continue [Y/n]? Y
Err http://us.archive.ubuntu.com/ubuntu/ precise-updates/main libpq5 amd64 9.1.5-0ubuntu12.04
404 Not Found [IP: 91.189.91.23 80]
Err http://security.ubuntu.com/ubuntu/ precise-security/main libpq5 amd64 9.1.5-0ubuntu12.04
404 Not Found [IP: 91.189.88.149 80]
Err http://security.ubuntu.com/ubuntu/ precise-security/main postgresql-client-9.1 amd64 9.1.5-0ubuntu12.04
404 Not Found [IP: 91.189.88.149 80]
Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/p/postgresql-9.1/libpq5_9.1.5-0ubuntu12.04_amd64.deb 404 Not Found [IP: 91.189.88.149 80]
Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/p/postgresql-9.1/postgresql-client-9.1_9.1.5-0ubuntu12.04_amd64.deb 404 Not Found [IP: 91.189.88.149 80]
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
I tried the suggested fix missing too but didn't work.
How can I install a postgresql package successfully? And mainly how can I get the $psql command to give me the desired output showed in the picture?
(Edit) I tried the first answer's suggestion:
vagrant#precise64:~$ apt-get update
E: Could not open lock file /var/lib/apt/lists/lock - open (13: Permission denied)
E: Unable to lock directory /var/lib/apt/lists/
E: Could not open lock file /var/lib/dpkg/lock - open (13: Permission denied)
E: Unable to lock the administration directory (/var/lib/dpkg/), are you root?
Then tried the solutions mentioned here :
vagrant#precise64:~$ ps aux | grep apt
vagrant 1144 0.0 0.2 11676 948 pts/0 S+ 18:59 0:00 grep --color=auto apt
I don't understand so I don't know what's next.
looks like you had some trouble installing several packages 404 Not Found.
Do sudo apt-get update and then retry the install.

yum installation manager not working in centos 6.6

I'm facing a problem with yum installation manager in centos 6.6
root#mmopuru:~ # cat /etc/*release
CentOS release 6.6 (Final)
CentOS release 6.6 (Final)
CentOS release 6.6 (Final)
root#mmopuru:~ # uname -a
Linux mmopuru.puppetlabs.vm 2.6.32-504.el6.i686 #1 SMP Wed Oct 15 03:02:07 UTC 2014 i686 i686 i386 GNU/Linux
Its throwing following err. I tried clean all but no use.
root#mmopuru:~ # yum install python-pip
Loaded plugins: fastestmirror, security
Setting up Install Process
Repository 'updates' is missing name in configuration, using id
Loading mirror speeds from cached hostfile
* epel: ftp.cuhk.edu.hk
* ius: ftp.neowiz.com
* remi-safe: mirror.innosol.asia
* update: mirror.nbrc.ac.in
http://mirror.centos.org/centos/6/addons/i386/repodata/repomd.xml: [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 404 Not Found"
Trying other mirror.
Error: Cannot retrieve repository metadata (repomd.xml) for repository: addons. Please verify its path and try again
How to resolve this?
When I run yum repolist
root#mmopuru:~ # yum repolist
Loaded plugins: fastestmirror, security
Repository 'updates' is missing name in configuration, using id
Loading mirror speeds from cached hostfile
epel/metalink | 4.0 kB 00:00
* epel: ftp.cuhk.edu.hk
* ius: mirror.amsiohosting.net
* remi-safe: mirrors.thzhost.com
* update: mirror.nbrc.ac.in
http://mirror.centos.org/centos/6/addons/i386/repodata/repomd.xml: [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 404 Not Found"
Trying other mirror.
http://mirror.centos.org/centos/6/addons/i386/repodata/repomd.xml: [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 404 Not Found"
Trying other mirror.
epel | 4.3 kB 00:00
epel/primary_db | 4.9 MB 00:05
ius | 2.2 kB 00:00
ius/primary_db | 194 kB 00:01
remi-safe | 2.9 kB 00:00
remi-safe/primary_db | 22 kB 00:00
update | 3.4 kB 00:00
update/primary_db | 3.7 MB 00:01
repo id repo name status
addons CentOS-6 - Addons 0
*epel Extra Packages for Enterprise Linux 6 - i386 9,857
ius IUS Community Packages for Enterprise Linux 6 - i386 356
remi-safe Safe Remi's RPM repository for Enterprise Linux 6 - i386 32
update CentOS-6 - Updates 989
repolist: 11,234
The content of /etc/yum.repos.d/centos-internal.repo is
root#mmopuru:~ # cat /etc/yum.repos.d/centos-internal.repo
# CentOS-Base.repo
#
# This file uses a new mirrorlist system developed by Lance Davis for CentOS.
# The mirror system uses the connecting IP address of the client and the
# update status of each mirror to pick mirrors that are updated to and
# geographically close to the client. You should use this for CentOS updates
# unless you are manually picking other mirrors.
#
# If the mirrorlist= does not work for you, as a fall back you can try the
# remarked out baseurl= line instead.
#
#
[base]
name=CentOS-$releasever - Base
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os
#baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/PM-GPG-KEY-CentOS-6
#released updates
enabled=0
[update]
name=CentOS-$releasever - Updates
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates
#baseurl=http://mirror.centos.org/centos/$releasever/updates/$basearch/
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/PM-GPG-KEY-CentOS-6
#packages used/produced in the build but not released
[addons]
name=CentOS-$releasever - Addons
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=addons
#baseurl=http://mirror.centos.org/centos/$releasever/addons/$basearch/
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/PM-GPG-KEY-CentOS-6
#additional packages that may be useful
[extras]
name=CentOS-$releasever - Extras
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras
#baseurl=http://mirror.centos.org/centos/$releasever/extras/$basearch/
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/PM-GPG-KEY-CentOS-6
#additional packages that extend functionality of existing packages
enabled=0
[centosplus]
name=CentOS-$releasever - Plus
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=centosplus
#baseurl=http://mirror.centos.org/centos/$releasever/centosplus/$basearch/
gpgcheck=1
enabled=0
gpgkey=http://mirror.centos.org/centos/PM-GPG-KEY-CentOS-6
#contrib - packages by Centos Users
[contrib]
name=CentOS-$releasever - Contrib
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=contrib
#baseurl=http://mirror.centos.org/centos/$releasever/contrib/$basearch/
gpgcheck=1
enabled=0
gpgkey=http://mirror.centos.org/centos/PM-GPG-KEY-CentOS-6
Remove the "addons" repository definition, which doesn't exists for CentOS 6 (it only exists for CentOS 5, but is empty).
I have just answered a similar question i.e. same error but for EPEL repo. I am answering here, may be it can come helpful for some future SO user.
Solution: The quick fix is to update your SSL certificates:
yum -y upgrade ca-certificates
Chances are the above error may also occur while certificate update, if so, just disable the repo i.e. addons which is causing the error, use the following command:
yum -y upgrade ca-certificates --disablerepo=addons
In case you're getting this same error for a different repo, just put it's name against the --disablerepo=<repo-name> flag.
Note: use sudo if you're not the root user.