armbian編譯安裝python3.7.3

1.Rush極簡版N1安裝Armbian

armbian下載地址:https://yadi.sk/d/pHxaRAs-tZiei

nano /etc/apt/sources.list

清華源:
 

deb https://mirrors.tuna.tsinghua.edu.cn/debian/ buster main contrib non-free
# deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ buster main contrib non-free
deb https://mirrors.tuna.tsinghua.edu.cn/debian/ buster-updates main contrib non-free
# deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ buster-updates main contrib non-free
deb https://mirrors.tuna.tsinghua.edu.cn/debian/ buster-backports main contrib non-free
# deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ buster-backports main contrib non-free
deb https://mirrors.tuna.tsinghua.edu.cn/debian-security buster/updates main contrib non-free
# deb-src https://mirrors.tuna.tsinghua.edu.cn/debian-security buster/updates main contrib non-free

修復sudo。若將U盤插入安卓系統後再移植系統,
則移植文件的所有權將出了問題,需要修復。
否則可以跳過此步驟,方法:
如果你使用自己的用戶登陸後,發現使用sudo命令出錯,告訴你所屬用戶id不對,那麼你可以使用如下辦法修復sudo:
先換root登陸N1,然後逐行輸入下述命令:

chown root:root /usr/bin/sudo
chmod 4755 /usr/bin/sudo
chown root:root /usr/lib/sudo/sudoers.so
chmod 4755 /usr/lib/sudo/sudoers.so
chown root:root /etc/sudoers
chown root:root /etc/sudoers.d
chown root:root /etc/sudoers.d/README

2.在Armbian中編譯安裝Python3.7.3

準備工作:

sudo apt-get install python3-dev python3-pip python3-venv

sudo apt-get install zlib1g-dev libbz2-dev libssl-dev libncurses5-dev libsqlite3-dev libreadline-dev tk-dev libgdbm-dev libdb-dev libpcap-dev xz-utils libexpat1-dev liblzma-dev libffi-dev libc6-dev openssl sqlite3 tcl-dev (tcl8.6-dev) uuid-dev

wget https://www.python.org/ftp/python/3.7.3/Python-3.7.3.tar.xz

編譯安裝前的準備
首先是要安裝一些包,如果沒有這些包,一般會在最後make時報出來,大概是這個樣子,

Python build finished successfully!
The necessary bits to build these optional modules were not found:
_bz2                  _curses               _curses_panel      
_dbm                  _gdbm                 _hashlib           
_lzma                 _sqlite3              _ssl               
_tkinter              _uuid                 readline           
To find the necessary bits, look in setup.py in detect_modules() for the module's name.
The following modules found by detect_modules() in setup.py, have been
built by the Makefile instead, as configured by the Setup files:
_abc                  atexit                pwd                
time                                                           
Could not build the ssl module!
Python requires an OpenSSL 1.0.2 or 1.1 compatible libssl with X509_VERIFY_PARAM_set1_host().
LibreSSL 2.6.4 and earlier do not provide the necessary APIs, 
https://github.com/libressl-portable/portable/issues/381

tar xvJf  Python-3.7.3.tar.xz

cd Python-3.7.3

./configure

make

make test

make install

3.Python3.7.3安裝homeassistant


這幾天都在爲N1新安裝的系統Armbian裝東西,作個備註。

解決pip裝軟件速度慢的問題:

(1)mkdir .pip

(2) cd .pip

(3) nano pip.conf

2

[global]

index-url = https://mirrors.aliyun.com/pypi/simple

 

安裝openssl報錯openssl: /usr/lib/x86_64-linux-gnu/libssl.so.1.1: version `OPENSSL_1_1_1' not found

2019-01-31 23:15:47 RookieWutongshu 閱讀數 3172 文章標籤: openssl

版權聲明:本文爲博主原創文章,遵循 CC 4.0 BY-SA 版權協議,轉載請附上原文出處鏈接和本聲明。

本文鏈接:https://blog.csdn.net/RookieWutongshu/article/details/86728315

在ubuntu上嘗試編譯安裝最新的openssl1.1.1的時候報錯:
openssl: /usr/lib/x86_64-linux-gnu/libssl.so.1.1: version OPENSSL_1_1_1’ not found (required by openssl)
查了一下,主要是LD_LIBRARY_PATH這個環境變量沒有指定導致openssl正在使用舊的系統OpenSSL庫
解決方法:

$ echo "export LD_LIBRARY_PATH=/usr/local/lib" >> ~/.bashrc
$ export LD_LIBRARY_PATH=/usr/local/lib
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章