Author:
erics , February 19th, 2022
I went to perform a yum update and got the following error:
Retrieving key from file : ///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql
The GPG keys listed for the "MySQL 5.7 Community Server" repository are already installed but they are not correct for this package .
Check that the correct key URLs are configured for this repository .
Failing package is : mysql - community - server - 5.7.37 - 1.el7.x86_64
GPG Keys are configured as : file : ///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql
SOLUTION: Import the needed new key and manually edit the config files before retrying the yum update.
rpm -- import https : //repo.mysql.com/RPM-GPG-KEY-mysql-2022
I had to edit two files: mysql-community-source.repo and mysql-community.repo
For 5.7 – add -2022 to the key name: i.e.: ORIGINAL:
gpgkey = file : ///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql
MODIFY ONE […]
Categories: How-To's , Technology Tags: GPG , GPG Key , key , mysql , Yum , yum update
| 2 comments
Author:
erics , December 3rd, 2020
Problem While running the aws cli command from a Perl async command inside apid, I go the following error:
IOError : [ Errno 10 ] No child processes
Solution The issue turned out to be a bug in Python2.7, so I upgraded to Python3.4, then uninstalled and re-installed the aws cli software so that it used the proper Python34 version. Procedure
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
sudo - i
cd
## Upgrade Python
yum install python34
alternatives -- config python
## "Uninstall" old aws cli
mv / opt / aws / opt / aws . fcs
cd / usr / bin /
mv aws aws . fcs
mv aws_completer aws_completer . fcs
## Install new aws cli
curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" - o "awscliv2.zip"
unzip awscliv2 . zip
. / aws / install - i / opt / aws - b / usr / bin
/ usr / bin / aws -- version
https://docs.aws.amazon.com/cli/latest/userguide/install-cliv2-linux.html […]
Categories: How-To's , Technology Tags: alternatives , API , apid , AWS , aws cli , AWS Linux , Broken , cli , Cloudformation , Command , Curl , Error , Exec , Execute , howto , IOError , Linux , No child processes , perl , Python , Python27 , Python34 , tips , Yum
| No comments
Author:
erics , May 6th, 2020
I ran letsencrypt-auto renew and got the following error:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
root @ prod06b : / etc / httpd / conf . d # /root/letsencrypt/letsencrypt-auto renew
Error : couldn 't get currently installed version for / opt / eff . org / certbot / venv / bin / letsencrypt :
Traceback ( most recent call last ) :
File "/opt/eff.org/certbot/venv/bin/letsencrypt" , line 7 , in < module >
from certbot . main import main
File "/opt/eff.org/certbot/venv/local/lib/python2.7/dist-packages/certbot/main.py" , line 2 , in < module >
from certbot . _internal import main as internal_main
File "/opt/eff.org/certbot/venv/local/lib/python2.7/dist-packages/certbot/_internal/main.py" , line 10 , in < module >
import josepy as jose
File "/opt/eff.org/certbot/venv/local/lib/python2.7/dist-packages/josepy/__init__.py" , line 41 , in < module >
from josepy . interfaces import JSONDeSerializable
File "/opt/eff.org/certbot/venv/local/lib/python2.7/dist-packages/josepy/interfaces.py" , line 7 , in < module >
from josepy import errors , util
File "/opt/eff.org/certbot/venv/local/lib/python2.7/dist-packages/josepy/util.py" , line 7 , in < module >
import OpenSSL
File "/opt/eff.org/certbot/venv/local/lib/python2.7/dist-packages/OpenSSL/__init__.py" , line 8 , in < module >
from OpenSSL import crypto , SSL
File "/opt/eff.org/certbot/venv/local/lib/python2.7/dist-packages/OpenSSL/crypto.py" , line 12 , in < module >
from cryptography import x509
ImportError : No module named cryptography
The solution in this article gave me the answer:
sudo rm - rf / opt / eff . org / *
sudo pip install - U certbot
sudo certbot renew -- debug
Turns out Python was old at version 2.7, so did the following also:
sudo yum - y install python36
sudo alternatives -- config python
sudo pip install -- upgrade pip
Also had to change the cron job script to call certbot directly instead of letsencrypt-auto : vi /root/letsencrypt-cron.sh
#!/bin/sh
#
# letsencrypt-cron.sh
#
#OLD: if ! /root/letsencrypt/letsencrypt-auto renew > /var/log/letsencrypt/renew.log 2>&1 ; then
#NEW:
if ! / usr / bin / certbot renew > / var / log / letsencrypt / renew . log 2 > & 1 ; then
echo Automated renewal failed :
cat / var / log / letsencrypt / renew . log
exit 1
fi
apachectl graceful
Categories: How-To's , Technology Tags: AWS , AWS Linux , cert , Certbot , howto , Install , Linux , pip , Python , Renew , ssl , tips , upgrade , Yum
| No comments
Author:
erics , March 25th, 2020
I tried upgrading pip when prompted to do so: sudo pip install –upgrade pip This worked, but removed the system install in /usr/bin/pip and replaced it with /usr/local/bin/pip – NOT GOOD! The solution is as follows:
/ usr / local / bin / pip uninstall pip
yum remove python27 - pip
yum install python27 - pip
Categories: How-To's , Technology Tags: Amazon , Amazon Linux , AWS , CentOS , Downgrade , howto , Install , Linux , pip , pip install , pip uninstall , tips , Uninstall , upgrade , Yum
| No comments
Author:
erics , January 21st, 2020
PROBLEM DEFINITION Bamboo Catalina error found in catalina.out:
- Djava . endorsed . dirs = / volumes / data / bamboo / current / endorsed is not supported . Endorsed standards and standalone APIs
in modular form will be supported via the concept of upgradeable modules .
Error : Could not create the Java Virtual Machine .
Error : A fatal exception has occurred . Program will exit .
SOLUTION SUMMARY Correct by using Java 8 instead. Do it manually using alternatives –set, or interactively using alternatives –config. MANUAL PROCEDURE – two steps, one for java and one for javac
alternatives -- set java / usr / lib / jvm / jre - 1.8.0 - openjdk . x86_64 / bin / java
alternatives -- set javac / usr / lib / jvm / jre - 1.8.0 - openjdk . x86_64 / bin / javac
INTERACTIVE PROCEDURE – two steps, one for java and one for javac
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
root @ bamboo : / root # alternatives --config javac
There are 3 programs which provide 'javac' .
Selection Command
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -
+ 1 / usr / lib / jvm / java - 1.8.0 - openjdk . x86_64 / bin / javac
* 2 / usr / lib / jvm / java - 11 - amazon - corretto / bin / javac
3 / usr / lib / jvm / java - 1.7.0 - openjdk . x86_64 / bin / javac
Enter to keep the current selection [ + ] , or type selection number :
root @ bamboo : / root # alternatives --config java
There are 4 programs which provide 'java' .
Selection Command
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -
+ 1 / usr / lib / jvm / jre - 1.8.0 - openjdk . x86_64 / bin / java
2 / usr / lib / jvm / jre - 1.6.0 - openjdk . x86_64 / bin / java
* 3 / usr / lib / jvm / java - 11 - amazon - corretto / bin / java
4 / usr / lib / jvm / jre - 1.7.0 - openjdk . x86_64 / bin / java
Enter to keep the current selection [ + ] , or type selection number :
Categories: How-To's , Technology Tags: alternatives , Bamboo , Catalina , catalina.out , Config , Endorsed , Endorsed standards , howto , Java , Java 8 , java upgrade , java.endorsed.dirs , javac , set , tips , upgrade , Yum , yum update
| No comments
Author:
erics , August 22nd, 2019
As root:
PACKAGES = ` yum list installed | grep php | awk - F . '{print $1}' | tr "\n\r" " " `
echo $ PACKAGES
yum remove - y $ PACKAGES
~or~
yum remove php56 php56 - cli php56 - common php56 - devel php56 - gd php56 - jsonc php56 - jsonc - devel php56 - mbstring php56 - mcrypt php56 - mysqlnd php56 - pdo php56 - pecl - imagick php56 - process php56 - xml
THEN:
yum install php72 php72 - bcmath php72 - cli php72 - common php72 - devel php72 - gd php72 - imap php72 - json php72 - mysqlnd php72 - pdo php72 - pecl - apcu php72 - pecl - imagick php72 - pecl - imagick - devel php72 - pecl - memcache php72 - php - bcmath php72 - php - common php72 - php - json php72 - process php72 - runtime php72 - xml php72 - mbstring php72 - pecl - mcrypt
Be sure to restart your web server!!
Categories: How-To's , Technology Tags: Amazon , AWS , Install , Linux , php , php7 , upgrade , Yum , yum install , yum list , yum remove , yum search
| No comments
Author:
erics , April 16th, 2019
Problem: Trying to run a yum -y update as root aborts with the following error:
The GPG keys listed for the "Percona-Release YUM repository - x86_64" repository are already installed but they are not correct for this package .
Check that the correct key URLs are configured for this repository .
Failing package is : sysbench - 1.0.17 - 2.el6.x86_64
GPG Keys are configured as : file : ///etc/pki/rpm-gpg/RPM-GPG-KEY-Percona
The solution, found on the Percona website, is this: sudo yum update percona-release Source URL: https://www.percona.com/blog/2019/02/05/new-percona-package-signing-key-requires-update-on-rhel-and-centos/
Categories: How-To's , Technology Tags: GPG , howto , key , Keys , Percona , percona-release , release , tips , update , Yum , yum update
| 1 comment
Author:
erics , January 9th, 2018
To remove a specific package without its dependencies use rpm:
rpm - qa | grep pecl
rpm - e -- nodeps php55 - pecl - jsonc php55 - pecl - jsonc - devel
As always, YMMV!
Categories: How-To's , Technology Tags: Dependencies , Deps , Erase , howto , nodeps , Package , Remove , RPM , tips , Yum
| No comments
Author:
erics , August 3rd, 2016
As usual, whenever I have to do sysadmin on a Ubuntu-based OS, I find problems. When will people realize what a horrible OS it is? In this case, packages needed were unavailable. For apt-get to function, the file /etc/apt/sources.list must be edited to change all URLs from security.ubuntu.com and archive.ubuntu.com to old-releases.ubuntu.com, using the sed […]
Categories: How-To's , Technology Tags: apt-get , archive , howto , old-releases , OS , sed , sources.list , tips , Ubuntu , update , Yum
| No comments
Author:
erics , March 29th, 2016
http://docs.aws.amazon.com/cli/latest/userguide/cli-chap-getting-set-up.html http://docs.aws.amazon.com/cli/latest/userguide/cli-chap-getting-started.html AWS CLI v2
curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" - o "awscliv2.zip"
unzip awscliv2 . zip
sudo . / aws / install
AWS CLI v1
cd
curl "https://s3.amazonaws.com/aws-cli/awscli-bundle.zip" - o "awscli-bundle.zip"
unzip awscli - bundle . zip
yum install python26
/ usr / bin / python26 awscli - bundle / install - i / opt / aws / awscli - b / usr / bin / aws
aws configure
aws s3 ls
aws ec2 describe - instances -- output text
ls -l ~/.aws
total 8
- rw -- -- -- - 1 root root 43 Mar 24 18 : 05 config
- rw -- -- -- - 1 root root 116 Mar 24 18 : 05 credentials
cat ~/.aws/config
[ default ]
output = json
region = us - east - 1
cat ~/.aws/credentials
[ default ]
aws_access_key_id = NNNNNNNNNNNNNNNNNNNN
aws_secret_access_key = NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN
Categories: How-To's , Technology Tags: AWS , cli , configure , Credentials , Creds , howto , Install , Python , python26 , tips , Yum
| No comments