1

I am running Ansible playbook and trying to install OS dependencies packages for python. I am trying to run the following:

sudo yum install gcc gcc-c++ libffi-devel python-devel python-pip python-wheel openssl-devel libsasl2-devel openldap-devel 

However, it fails at installing libsasl2-devel with the message: "No package matching 'libsasl2-devel' found available, installed or updated"

All my instances are Amazon Linux 2 machines. Is there any alternative package for this? I tried to look into this but I found solutions for Ubuntu only.

Tanmaya Nanda
  • 21
  • 1
  • 5
  • Same problem. As a possibly helpful note, Ami installs libsals3 instead of 2, which is supposed to fully backwards compatible. However, it doesn't solve the dependency requirements. – ppostma1 Oct 10 '19 at 23:51

1 Answers1

4

I was able to get it to work in a series of steps. Its a yum issue after other databases are installed and not cleaned up before installing mysql

clear sasl first: sudo yum remove cyrus-sasl

if you have installed maria, there will be conflicts, remove that as well sudo yum remove mariadb mariadb-server mariadb-libs

take note of anything uninstalled by this to re-add later. If this is too much, you can take a risk and not remove sasl, but it might not reset the availability of the package.

Start here to clean up the dependency issues: https://serverfault.com/questions/873955/how-solve-mysql-5-7-dependency follow the command given by clean all as sudo rm -rf /var/cache/yum/*

This can possibly resolve your issues right there, if not continue the installation below.

delete all data left in /var/lib/mysql/ or you may have upgrade issues.

resinstall sasl: sudo yum install cyrus-sasl cyrus-sasl-devel and any other packages removed above.

Establish mysql5.7 with the yum services.

wget https://dev.mysql.com/get/mysql57-community-release-el6-11.noarch.rpm
sudo yum localinstall -y mysql57-community-release-el6-11.noarch.rpm
sudo yum repolist enabled | grep "mysql.*-community.*"
sudo yum repolist enabled | grep mysql
sudo yum install -y mysql-community-common mysql-community-libs mysql-community-server mysql-community-client

if that doesn't work, re-clear the yum cache again and re-run sudo yum install -y mysql-community-server

if that works, then

sudo service mysqld start

IF the /var/lib/mysql is empty, it will have created a temporary password in the /var/log/mysqld.log (use sudo to read)

run sudo mysql_secure_installation and establish your real password and security settings.

now you should have access via mysql -u root -p

ppostma1
  • 3,616
  • 1
  • 27
  • 28