서버에 python, pip 버전 맞추기
필요없는 파이썬 PPA 삭제
cd /etc/apt/sources.list.d sudo rm jonathonf-python-3_6-trusty.list*
전체 패키지 업데이트
sudo apt-get update && sudo apt-get upgrade -y && sudo apt-get dist-upgrade -y && sudo apt-get autoremove -y
재부팅
sudo shutdown -r now
OpenSSL 다운로드
wget https://www.openssl.org/source/openssl-1.1.1g.tar.gz tar -zxvf openssl-1.1.1g.tar.gz sudo apt install build-essential ./config make make test sudo make install sudo rm /usr/lib/libcrypto.so* sudo rm /usr/lib/libssl.so* sudo ln -s /usr/local/lib/libcrypto.so.1.1 /usr/lib/libcrypto.so sudo ln -s /usr/local/lib/libssl.so.1.1 /usr/lib/libssl.so sudo ln -s /usr/local/lib/libcrypto.so.1.1 /usr/lib/libcrypto.so.1.1 sudo ln -s /usr/local/lib/libssl.so.1.1 /usr/lib/libssl.so.1.1
망가진 lsb_release 수정
sudo vi /usr/bin/lsb_release // python3 -> python2
Python 빌드 의존성 설치
sudo apt-get update; sudo apt-get install --no-install-recommends make build-essential libssl-dev zlib1g-dev libbz2-dev libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev xz-utils tk-dev libxml2-dev libxmlsec1-dev libffi-dev liblzma-dev
pyenv 설치
git clone https://github.com/pyenv/pyenv.git ~/.pyenv echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.bashrc echo 'export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.bashrc echo -e 'if command -v pyenv 1>/dev/null 2>&1; then\n eval "$(pyenv init -)"\nfi' >> ~/.bashrc source ~/.bashrc pyenv install 3.7.0 pyenv global 3.7.0
pip3 install --upgrade setuptools
결론
버전맞추기가 제일 어려웠음..
-
Please register or login to post a comment