0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

Ubntu16.04.7にPython3.9をインストール

Posted at

初めに

備忘録として残します!

opensslをversionアップする

cd /usr/local/src
sudo wget https://www.openssl.org/source/openssl-1.1.1o.tar.gz 
sudo tar xvf openssl-1.1.1o.tar.gz # 解凍
cd openssl-1.1.1o
sudo ./config # sourceをコンパイルしてインストールする
sudo make 
sudo make install 
which openssl # opensslの場所を確認
ldd /usr/local/openssl # opensslの共有ライブラリの確認
  • wgetを行うダウンロード先は、確認しましょう。
  • 共有ライブラリの確認の際、not foundとなっている場合、下のようにldconfigにキャッシュ対象を追加するを参照する

ldonfigにキャッシュ対象を追加する

cd ld.so.conf.d/
sudo vim openssl-1.1.1o.conf # /usr/local/をopenssl-1.1.1o.confに記入する
ldconfig #/etc/ld.so.confを/etc/ld.so.cacheに反映する

python3.9をインストール

sudo wget https://www.python.org/ftp/python/3.9.1/Python-3.9.1.tgz
sudo tar xvf Python-3.9.1.tgz
cd Python-3.9.1/
sudo ./configure --enable-optimizations
sudo make -j 12 
sudo make altinstall
sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.9 3
sudo cp /usr/lib/python3/dist-package/lsb_release.py /usr/local/lib/python3.9

参考
opensslインストール

https://text.baldanders.info/remark/2020/06/installing-openssl-in-ubuntu/

python3.9インストール

https://codechacha.com/ja/ubuntu-install-python39/
pip installのエラー解決
https://qiita.com/sinri/items/f819424acc37ac513c99

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?