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
  • 1
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 2
    评论
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值