How to compile python3 on RHEL with SSL? SSL cannot be imported

Had a very similar problem, with openssl not working and giving the same errors with python 3.10 on centos 7. Download openssl unpack then go to that directory ./config –prefix=/usr/local/custom-openssl –openssldir=/etc/ssl make -j1 depend make -j8 make install_sw Then go to the python source unpack it and run in the directory ./configure -C –with-openssl=/usr/local/custom-openssl –with-openssl-rpath=auto … Read more

python sys.exit not working in try [duplicate]

sys.exit() raises an exception, namely SystemExit. That’s why you land in the except-block. See this example: import sys try: sys.exit() except: print(sys.exc_info()[0]) This gives you: <type ‘exceptions.SystemExit’> Although I can’t imagine that one has any practical reason to do so, you can use this construct: import sys try: sys.exit() # this always raises SystemExit except … Read more

How to change the mysql root password

One option is to save UPDATE mysql.user SET Password=PASSWORD(‘newpass’) WHERE User=”root”; into a file and then manually start mysqld with –init-file=FILENAME. Once the server starts, it should reset your password, and then you should be able to log in. After this, you should shut down the server and start it normally.

Start ssh-agent on login [closed]

Please go through this article. You may find this very useful: https://web.archive.org/web/20210506080335/https://mah.everybody.org/docs/ssh Just in case the above link vanishes some day, I am capturing the main piece of the solution below: This solution from Joseph M. Reagle by way of Daniel Starin: Add this following to your .bash_profile SSH_ENV=”$HOME/.ssh/agent-environment” function start_agent { echo “Initialising new … Read more