原因:GFW的影响导致无法访问默认PPA源,表现为
Downloading 3 required data files...
Unpacking...
bzip2: Can't open input file *.bz2: No such file or directory.
Error while running last command
dpkg: 处理软件包 howdy (--configure)时出错:
已安装 howdy 软件包 post-installation 脚本 子进程返回错误状态 1
正在处理用于 man-db (2.9.1-1) 的触发器 ...
在处理时有错误发生:
howdy
E: Sub-process /usr/bin/dpkg returned an error code (1)
或者是在执行 sudo apt update时无法链接到PPA。
解决方案,首先自行下载三个依赖库,移动到指定目录:
要去这里把dlib_face_recognition_resnet_model_v1.dat.bz2、mmod_human_face_detector.dat.bz2和shape_predictor_5_face_landmarks.dat.bz2给手动下载下来。 当然如果网络还是不好,就把整个项目git clone下来,再去选对应文件。
把这三个文件下载了之后,首先去新建位于lib/security/howdy/dlib-data的文件夹,把那三个压缩包(不要解压)放进去。
接下来替换PPA源:
1.创建一个名为 pip.conf 的配置文件,在「终端」中执行:
mkdir ~/.pip
cd ~/.pip
touch pip.conf
2用 vi 或 nano 编辑器在 pip.conf 文件中写入阿里云的 pip 源地址:
[global]
index-url = https://mirrors.aliyun.com/pypi/simple/
[install]
trusted-host = mirrors.aliyun.com
写入上述内容后保存退出。
3打开「终端」执行以下命令添加 PPA,并安装
sudo add-apt-repository ppa:boltgolt/howdy
sudo apt update
sudo apt install howdy
这样就可以顺利的安装了。