Kaushal Shriyan
2021-Nov-09 15:01 UTC
[CentOS] Install OpenSSL 1.1.1 on CentOS Linux release 7.9.2009 (Core).
Hi, I have downloaded Python 3.10.0 on CentOS Linux release 7.9.2009 (Core). I have the below openssl and mariadb package installed on CentOS 7.9 # rpm -qa | grep openssl openssl-libs-1.0.2k-22.el7_9.x86_64 openssl-devel-1.0.2k-22.el7_9.x86_64 openssl-1.0.2k-22.el7_9.x86_64 #rpm -qa | grep mariadb mariadb-libs-5.5.68-1.el7.x86_64 mariadb-5.5.68-1.el7.x86_64 mariadb-server-5.5.68-1.el7.x86_64 mariadb-devel-5.5.68-1.el7.x86_64 # #mysql -p Enter password: Welcome to the MariaDB monitor. Commands end with ; or \g. Your MariaDB connection id is 2 Server version: 5.5.68-MariaDB MariaDB Server Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. MariaDB [(none)]> Bye # #wget https://www.python.org/ftp/python/3.10.0/Python-3.10.0.tgz #tar xzf Python-3.10.0.tgz #cd Python-3.10.0 #./configure --enable-optimizations #make altinstall # python3.10 Python 3.10.0 (default, Nov 6 2021, 14:56:25) [GCC 4.8.5 20150623 (Red Hat 4.8.5-44)] on linux Type "help", "copyright", "credits" or "license" for more information.>>> import mysql.connectorTraceback (most recent call last): File "<stdin>", line 1, in <module> ModuleNotFoundError: No module named 'mysql'>>>#cat demo_mysql_test.py import mysql.connector # python3.10 demo_mysql_test.py Traceback (most recent call last): File "/root/demo_mysql_test.py", line 1, in <module> import mysql.connector ModuleNotFoundError: No module named 'mysql' # # pip3.10 install mysql-connector-python WARNING: pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available. WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /simple/mysql-connector-python/ WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /simple/mysql-connector-python/ WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /simple/mysql-connector-python/ WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /simple/mysql-connector-python/ WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /simple/mysql-connector-python/ Could not fetch URL https://pypi.org/simple/mysql-connector-python/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host=' pypi.org', port=443): Max retries exceeded with url: /simple/mysql-connector-python/ (Caused by SSLError("Can't connect to HTTPS URL because the SSL module is not available.")) - skipping ERROR: Could not find a version that satisfies the requirement mysql-connector-python (from versions: none) ERROR: No matching distribution found for mysql-connector-python WARNING: You are using pip version 21.2.3; however, version 21.3.1 is available. You should consider upgrading via the '/usr/local/bin/python3.10 -m pip install --upgrade pip' command. As of Python 3.10, OpenSSL 1.1.1 or newer is required: https://www.python.org/dev/peps/pep-0644/ Please guide me in installing OpenSSL version 1.1.1 Thanks in advance and I look forward to hearing from you. Best Regards, Kaushal
Steve Meier
2021-Nov-09 15:56 UTC
[CentOS] Install OpenSSL 1.1.1 on CentOS Linux release 7.9.2009 (Core).
Hello Kaushal, the EPEL repository has OpenSSL 1.1 packages available: # yum install epel-release # yum install openssl11 openssl11-libs openssl11-devel If you want to compile software with OpenSSL 1.1 instead of 1.0 you may have to set the proper path or environment variables such as LDFLAGS. Hope this helps. Kind regards, Steve