【Problem】青龙面板支持库安装失败
编辑
143
2022-01-04
准备工作
docker exec -it qinglong bash # 进入容器命令行
APK 加速
vi /etc/apk/repositories
http://mirrors.aliyun.com/alpine/v3.8/main/
http://mirrors.aliyun.com/alpine/v3.8/community/
PIP 加速
mkdir ~/.pip
vi pip.conf
[global]
index-url = https://pypi.tuna.tsinghua.edu.cn/simple/
支持库安装失败
1. mysqlclient 安装失败
apk update
apk add --no-cache gcc musl-dev mysql-dev python3-dev # 如果网络波动就分开运行
pip install --upgrade pip
pip install mysqlclient
推荐用 pymysql 替代 MySQLdb 库
2. numpy 安装失败
apk update
apk add --no-cache gcc musl-dev python3-dev libxslt-dev
apk add --no-cache build-base gfortran libexecinfo-dev
pip3 install numpy==1.24.4
3. ddddocr
默认的青龙面板无法安装,切换为 Debian 版本: whyour/qinglong:debian
国内源加速
cp /etc/apt/sources.list /etc/apt/sources.list.bak
sed -i 's|http://deb.debian.org/debian|http://mirrors.ustc.edu.cn/debian|g' /etc/apt/sources.list
sed -i 's|http://security.debian.org/debian-security|http://mirrors.ustc.edu.cn/debian-security|g' /etc/apt/sources.list
apt update
安装依赖
apt install vim
apt install -y gcc python3-dev libxslt1-dev build-essential gfortran libc6-dev musl-tools
安装包
pip3 install ddddocr==1.5.3 -i https://pypi.tuna.tsinghua.edu.cn/simple/
- 0
- 0
-
赞助
微信 -
分享