不信人间有白头

曲淡歌
曲淡歌@admin

2021 年 7 月 12 日

刷淘宝看到的挺鼻器(为什么我会刷到这种东西?)

4.0嘻TgzlXjfBWxK嘻 https://m.tb.cn/h.4CxBJsD?sm=8ad001 堪比long鼻-店猪推荐超好用挺鼻器-操作简单-高挺鼻梁不是梦

然后看到了这样一条评论,笑辣

2021 年 7 月 12 日 115

回复

曲淡歌
曲淡歌@admin

2021 年 7 月 12 日

原来对话功能就是要按回车
每次会换一个头像?
2021 年 7 月 12 日 128
曲淡歌
曲淡歌@admin

2021 年 7 月 11 日

这是一条来自手机的动态,之后可以考虑使用网页转app

2021 年 7 月 11 日 129 1
  • 曲淡歌

    2021 年 7 月 11 日

    网页转app用一个叫“fusion app”的软件

曲淡歌
曲淡歌@admin

2021 年 7 月 11 日

2021-07-11,我开始使用wordpress配合一个花费了我¥249的主题,搭建了一个属于我自己的微博。本来考虑到之前已经用typecho写了接近500条日常,想购买油老师开发的那款¥88的仿twitter主题,但是他表示主题已经停售了。最后几经周折,选择了这款简约但是实用的主题,而且看作者的更新日历,这个主题已经从2013年更新到2021年了,作者的人品还是很坚挺的。
不过一开始其实我是不想用wordpress的,因为这个框架确实显得有点老而且过时了。如果是早几年的我,我可能更倾向于使用成熟的、有着广泛参考资料的系统,但是使用mysql这种充满了古旧气息的数据库,总让我觉得这个决定在未来会给我带来困扰…但是现在也没有更好的选择了。
其实我个人是更倾向于使用思源笔记+oceanpress组合。可惜这套方案的部署麻烦,开发进度也缓慢。

时光捕手主题文档 https://doc.dukeyin.com/keepmins/zh

如何把typecho的文章转换到wordpress中 https://boke112.com/post/6482.html/mip

#[17] #[7]
2021 年 7 月 11 日 172
曲淡歌
曲淡歌@admin

2021 年 4 月 5 日

动画生成工具manim的安装笔记 

参考资料

3分钟安装好Manim教学动画制作包|Windows

官方github

国人修改版-中文友好但是更新落后

安装思路

使用新版windows提供的linux系统安装

之前都是想直接安装,发现总是配置出错,现在win10也兼容了linux了,何不如在win10下安装Linux之后再使用命令行安装呢?

在win商店搜索ubuntu并下载

ps:在大陆使用win商店不能挂梯子,否则会直接无法连接。如果下载慢的话,搜索一下如何开启p2p下载的功能

报错 WslRegisterDistribution failed with error: 0x8007019e

解决办法:
1.win+x,选择Windows PowerShell(管理员)
2.输入:

Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux
3.回车,输入Y,重启!
4.重新打开已经安装的子系统,等几分钟,输入账户和密码
————————————————
版权声明:本文为CSDN博主「Vintage TANG」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/qq_33033367/article/details/82820983

设置ubuntu账户

id:quqi

密码:qaq

开始安装(失败)

检查python环境

输入python3检查有无py,然后输入quit ()退出

安装pip

sudo apt-get install python3-pip

提示:

quqi@DESKTOP-TE57I1A:~$ sudo apt-get install python3-pip
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package python3-pip is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'python3-pip' has no installation candidate

应该是apt没有更新,输入sudo apt-get update

然后输入pip3,如果提示正常则说明可用

让linux可以使用win的代理

Windows 10里的WSL Ubuntu 怎么使用Windows系统的 SS 代理?

pip3 install genpac

sudo nano /etc/profile在文件末尾加入

export http_proxy=http://127.0.0.1:7890 
export https_proxy=http://127.0.0.1:7890 
export ftp_proxy=http://127.0.0.1:7890

使配置生效source /etc/profile

安装相关支持

sudo apt-get install libcairo2-dev

sudo apt install ffmpeg

sudo apt-get install sox

sudo apt install texlive-latex-extra或者(前者为简单版)sudo apt install texlive texlive-latex-extra texlive-fonts-extra texlive-latex-recommended texlive-science

pip3 install manimlib

到此为止安装后总是各种毛病,于是卸载重装ubuntu

把ubuntu安装到其他盘

下载安装包

解压到自定义位置,重命名为.zip文件,点击Ubuntu.exe开始安装

报错

WslRegisterDistribution failed with error: 0x80070057
Error: 0x80070057 ?????

更新系统后还是无法解决,放弃

第二种安装方式:git

使用git clone

git clone https://github.com/3b1b/manim

在win下安装

参考资料

Manim安装教程

Scoop官网:https://scoop.sh/
Conda清华源:https://mirrors.tuna.tsinghua.edu.cn/help/anaconda/
Scoop软件源目录:https://rasa.github.io/scoop-directory/by-score
manim官网:https://github.com/3b1b/manim

直接安装

打开powershell

安装scope

Set-ExecutionPolicy RemoteSigned -scope CurrentUser
iwr -useb get.scoop.sh | iex

安装aria2

scoop install aria2

安装git

scoop install git

拓展源

scoop bucket add extras

安装ffmpeg

scoop search ffmpeg

查询到多个,选择一个安装

scoop install ffmpeg-nightly

安装LaTeX

scoop install LaTeX

使用anaconda安装(成功)#使用anaconda安装manim

成功安装但是无法支持中文

步骤概述:安装anaconda-按照github说明安装依赖-git clone/下载源码并放到本地-激活conda环境-安装requriments.txt-使用manimgl命令生成动画

  • 中间有一个报错

     No module named manim.__main__; 'manim' is a package and cannot be directly executed
    • 解决参考
    • python -m pip install --upgrade manim

      • 2021-04-02备注:pip的版本可能落后了,这样操作可能会导致奇怪的错误
  • 易错点:之前的教程很多都还是python -m manim example_scenes.py SquareToCircle -pl
    而现在最新版本已经是manimgl example_scenes.py OpeningManimExample

所以也要学会因地制宜、与时俱进,不要总是套过去的教程

再次尝试安装 2021-04-02 #2021-04-02-Manim

要求:这次不要使用pip,全程使用git

  • 创建新的conda环境

    1. conda create -n manim-kg python=3.8.5对应着manim-kindergarten
    2. 激活环境 conda activate manim-kg
    3. 发现可能之前安装的miktex不全,所以先卸载再重装

      1. 卸载:用管理员打开powershell,输入scoop uninstall latex
      2. 安装:

        1. 官网下载地址,选择all download,然后选择net install,根据电脑选择32或者64bit
        2. 选择download miktex,另外也可以在connetion settings里面设置代理开启代理的ip端口7890
        3. 下一步选择complete miktex,一路下载安装
    4. 然后下载修改版的manim,解压到manim-kg中并重命名为manim
    5. 然后pip install -r requirements.txt
    6. 使用pip list检查

      Package Version
      ————- ——————-
      certifi 2020.12.5
      colour 0.1.5
      numpy 1.20.2
      opencv-python 4.5.1.48
      Pillow 8.2.0
      pip 21.0.1
      progressbar 2.5
      pycairo 1.20.0
      pydub 0.25.1
      Pygments 2.8.1
      pyreadline 2.1
      scipy 1.6.2
      setuptools 52.0.0.post20210125
      tqdm 4.59.0
      wheel 0.36.2
      wincertstore 0.2

    7. 安装完成,尝试生成范例

      使用docker安装(成功)

      jasonkwan/manim

      b站相关视频

      相关的博客

      安装命令:docker run -it --rm -v /host/scene/dir:/scenes jasonkwan/manim:latest

      具体为:docker run -it --rm -v e:\docker:/scenes jasonkwan/manim:latest

      然后切换到py脚本目录cd /scenes/manim

      然后运行示例

  1. example.py SquareToCircle -p -ql

最后在目录:`E:\docker\manim\videos\example\480p15\partial_movie_files\Demo`下可以找到生成的视频文件!

对命令的解释:

![manim-illustration](https://raw.githubusercontent.com/ManimCommunity/manim/master/docs/source/_static/command.png)

安装完成后确实可以输出我之前做的那个例子,但是在官网找的其他例子又有问题。(manim这配置真的是麻烦到家了)

## 在树莓派里安装

Using username “pi”.
pi@192.168.1.61’s password:
Linux raspberrypi 5.10.17-v7l+ #1403 SMP Mon Feb 22 11:33:35 GMT 2021 armv7l

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Fri Mar 12 23:49:10 2021

SSH is enabled and the default password for the ‘pi’ user has not been changed.
This is a security risk – please login as the ‘pi’ user and type ‘passwd’ to set a new password.

pi@raspberrypi:~ $ ping
Usage: ping [-aAbBdDfhLnOqrRUvV64] [-c count] [-i interval] [-I interface]

        [-m mark] [-M pmtudisc_option] [-l preload] [-p pattern] [-Q tos]
        [-s packetsize] [-S sndbuf] [-t ttl] [-T timestamp_option]
        [-w deadline] [-W timeout] [hop1 ...] destination

Usage: ping -6 [-aAbBdDfhLnOqrRUvV] [-c count] [-i interval] [-I interface]

         [-l preload] [-m mark] [-M pmtudisc_option]
         [-N nodeinfo_option] [-p pattern] [-Q tclass] [-s packetsize]
         [-S sndbuf] [-t ttl] [-T timestamp_option] [-w deadline]
         [-W timeout] destination

pi@raspberrypi:~ $ ping baidu.com
PING baidu.com (220.181.38.148) 56(84) bytes of data.
64 bytes from 220.181.38.148 (220.181.38.148): icmp_seq=1 ttl=49 time=3.47 ms
64 bytes from 220.181.38.148 (220.181.38.148): icmp_seq=2 ttl=49 time=3.28 ms
64 bytes from 220.181.38.148 (220.181.38.148): icmp_seq=3 ttl=49 time=3.43 ms
64 bytes from 220.181.38.148 (220.181.38.148): icmp_seq=4 ttl=49 time=5.24 ms
64 bytes from 220.181.38.148 (220.181.38.148): icmp_seq=5 ttl=49 time=3.32 ms
^C
— baidu.com ping statistics —
5 packets transmitted, 5 received, 0% packet loss, time 11ms
rtt min/avg/max/mdev = 3.275/3.747/5.241/0.752 ms
pi@raspberrypi:~ $ ping github.com
PING github.com (52.74.223.119) 56(84) bytes of data.
64 bytes from ec2-52-74-223-119.ap-southeast-1.compute.amazonaws.com (52.74.223. 119): icmp_seq=1 ttl=35 time=181 ms
64 bytes from ec2-52-74-223-119.ap-southeast-1.compute.amazonaws.com (52.74.223. 119): icmp_seq=2 ttl=35 time=201 ms
64 bytes from ec2-52-74-223-119.ap-southeast-1.compute.amazonaws.com (52.74.223. 119): icmp_seq=3 ttl=35 time=183 ms
64 bytes from ec2-52-74-223-119.ap-southeast-1.compute.amazonaws.com (52.74.223. 119): icmp_seq=4 ttl=35 time=189 ms
64 bytes from ec2-52-74-223-119.ap-southeast-1.compute.amazonaws.com (52.74.223. 119): icmp_seq=5 ttl=35 time=206 ms
64 bytes from ec2-52-74-223-119.ap-southeast-1.compute.amazonaws.com (52.74.223. 119): icmp_seq=6 ttl=35 time=203 ms
64 bytes from ec2-52-74-223-119.ap-southeast-1.compute.amazonaws.com (52.74.223.119): icmp_seq=7 ttl=35 time=182 ms
64 bytes from ec2-52-74-223-119.ap-southeast-1.compute.amazonaws.com (52.74.223.119): icmp_seq=8 ttl=35 time=200 ms
64 bytes from ec2-52-74-223-119.ap-southeast-1.compute.amazonaws.com (52.74.223.119): icmp_seq=9 ttl=35 time=180 ms
64 bytes from ec2-52-74-223-119.ap-southeast-1.compute.amazonaws.com (52.74.223.119): icmp_seq=10 ttl=35 time=16 7 ms
64 bytes from ec2-52-74-223-119.ap-southeast-1.compute.amazonaws.com (52.74.223.119): icmp_seq=11 ttl=35 time=13 2 ms
64 bytes from ec2-52-74-223-119.ap-southeast-1.compute.amazonaws.com (52.74.223.119): icmp_seq=12 ttl=35 time=18 8 ms
^C
— github.com ping statistics —
12 packets transmitted, 12 received, 0% packet loss, time 27ms
rtt min/avg/max/mdev = 131.733/184.452/205.817/19.311 ms
pi@raspberrypi:~ $ pip

Usage:
pip [options]

Commands:
install Install packages.
download Download packages.
uninstall Uninstall packages.
freeze Output installed packages in requirements format.
list List installed packages.
show Show information about installed packages.
check Verify installed packages have compatible dependencies.
config Manage local and global configuration.
search Search PyPI for packages.
wheel Build wheels from your requirements.
hash Compute hashes of package archives.
completion A helper command used for command completion.
help Show help for commands.

General Options:
-h, –help Show help.
–isolated Run pip in an isolated mode, ignoring environment variables and user

                          configuration.

-v, –verbose Give more output. Option is additive, and can be used up to 3 times.
-V, –version Show version and exit.
-q, –quiet Give less output. Option is additive, and can be used up to 3 times

                          (corresponding to WARNING, ERROR, and CRITICAL logging levels).

–log Path to a verbose appending log.
–proxy Specify a proxy in the form [user:passwd@]proxy.server:port.
–retries Maximum number of retries each connection should attempt (default 5 times).
–timeout Set the socket timeout (default 15 seconds).
–exists-action Default action when a path already exists: (s)witch, (i)gnore, (w)ipe, (b)ackup,

                          (a)bort).

–trusted-host Mark this host as trusted, even though it does not have valid or any HTTPS.
–cert Path to alternate CA bundle.
–client-cert Path to SSL client certificate, a single file containing the private key and the

                          certificate in PEM format.

–cache-dir Store the cache data in .
–no-cache-dir Disable the cache.
–disable-pip-version-check

                          Don't periodically check PyPI to determine whether a new version of pip is
                          available for download. Implied with --no-index.

–no-color Suppress colored output
pi@raspberrypi:~ $ sudo apt-get update
命中:1 http://raspbian.raspberrypi.org/raspbian buster InRelease
命中:2 http://archive.raspberrypi.org/debian buster InRelease
正在读取软件包列表… 完成
pi@raspberrypi:~ $ pip3

Usage:
pip3 [options]

Commands:
install Install packages.
download Download packages.
uninstall Uninstall packages.
freeze Output installed packages in requirements format.
list List installed packages.
show Show information about installed packages.
check Verify installed packages have compatible dependencies.
config Manage local and global configuration.
search Search PyPI for packages.
wheel Build wheels from your requirements.
hash Compute hashes of package archives.
completion A helper command used for command completion.
help Show help for commands.

General Options:
-h, –help Show help.
–isolated Run pip in an isolated mode, ignoring environment variables and user

                          configuration.

-v, –verbose Give more output. Option is additive, and can be used up to 3 times.
-V, –version Show version and exit.
-q, –quiet Give less output. Option is additive, and can be used up to 3 times

                          (corresponding to WARNING, ERROR, and CRITICAL logging levels).

–log Path to a verbose appending log.
–proxy Specify a proxy in the form [user:passwd@]proxy.server:port.
–retries Maximum number of retries each connection should attempt (default 5 times).
–timeout Set the socket timeout (default 15 seconds).
–exists-action Default action when a path already exists: (s)witch, (i)gnore, (w)ipe, (b)ackup,

                          (a)bort).

–trusted-host Mark this host as trusted, even though it does not have valid or any HTTPS.
–cert Path to alternate CA bundle.
–client-cert Path to SSL client certificate, a single file containing the private key and the

                          certificate in PEM format.

–cache-dir Store the cache data in .
–no-cache-dir Disable the cache.
–disable-pip-version-check

                          Don't periodically check PyPI to determine whether a new version of pip is
                          available for download. Implied with --no-index.

–no-color Suppress colored output
pi@raspberrypi:~ $ sudo apt-get install libcairo2-dev
正在读取软件包列表… 完成
正在分析软件包的依赖关系树
正在读取状态信息… 完成
将会同时安装下列软件:
libblkid-dev libcairo-script-interpreter2 libffi-dev libfontconfig1-dev libglib2.0-dev libglib2.0-dev-bin
liblzo2-2 libmount-dev libpcre16-3 libpcre3-dev libpcre32-3 libpcrecpp0v5 libpixman-1-dev libselinux1-dev
libsepol1-dev libxcb-render0-dev libxcb-shm0-dev libxext-dev libxrender-dev uuid-dev x11proto-xext-dev
建议安装:
libcairo2-doc libglib2.0-doc libgdk-pixbuf2.0-bin | libgdk-pixbuf2.0-dev libxml2-utils libxext-doc
下列【新】软件包将被安装:
libblkid-dev libcairo-script-interpreter2 libcairo2-dev libffi-dev libfontconfig1-dev libglib2.0-dev
libglib2.0-dev-bin liblzo2-2 libmount-dev libpcre16-3 libpcre3-dev libpcre32-3 libpcrecpp0v5 libpixman-1-dev
libselinux1-dev libsepol1-dev libxcb-render0-dev libxcb-shm0-dev libxext-dev libxrender-dev uuid-dev
x11proto-xext-dev
升级了 0 个软件包,新安装了 22 个软件包,要卸载 0 个软件包,有 0 个软件包未被升级。
需要下载 6,451 kB 的归档。
解压缩后会消耗 21.5 MB 的额外空间。
您希望继续执行吗? [Y/n] y
获取:1 http://archive.raspberrypi.org/debian buster/main armhf libcairo-script-interpreter2 armhf 1.16.0-4+rpt1 [150 kB]
获取:2 http://mirrors.nju.edu.cn/raspbian/raspbian buster/main armhf uuid-dev armhf 2.33.1-0.1 [92.4 kB]
获取:4 http://archive.raspberrypi.org/debian buster/main armhf libpixman-1-dev armhf 0.36.0-1+rpt1 [498 kB]
获取:6 http://archive.raspberrypi.org/debian buster/main armhf libcairo2-dev armhf 1.16.0-4+rpt1 [618 kB]
获取:5 http://mirrors.bfsu.edu.cn/raspbian/raspbian buster/main armhf liblzo2-2 armhf 2.10-0.1 [48.4 kB]
获取:7 http://mirrors.nju.edu.cn/raspbian/raspbian buster/main armhf libfontconfig1-dev armhf 2.13.1-2 [943 kB]
获取:9 http://mirrors.nju.edu.cn/raspbian/raspbian buster/main armhf x11proto-xext-dev all 2018.4-4 [3,128 B]
获取:3 http://mirrors.neusoft.edu.cn/raspbian/raspbian buster/main armhf libblkid-dev armhf 2.33.1-0.1 [210 kB]
获取:10 http://mirrors.bfsu.edu.cn/raspbian/raspbian buster/main armhf libxext-dev armhf 2:1.3.3-1+b2 [102 kB]
获取:8 http://mirrors.zju.edu.cn/raspbian/raspbian buster/main armhf libxrender-dev armhf 1:0.9.10-1 [37.7 kB]
获取:11 http://mirrors.zju.edu.cn/raspbian/raspbian buster/main armhf libxcb-render0-dev armhf 1.13.1-2 [111 kB]
获取:12 http://mirrors.zju.edu.cn/raspbian/raspbian buster/main armhf libxcb-shm0-dev armhf 1.13.1-2 [100 kB]
获取:14 http://mirrors.neusoft.edu.cn/raspbian/raspbian buster/main armhf libglib2.0-dev-bin armhf 2.58.3-2+deb1 0u2 [155 kB]
获取:15 http://mirrors.nju.edu.cn/raspbian/raspbian buster/main armhf libmount-dev armhf 2.33.1-0.1 [209 kB]
获取:17 http://mirrors.bfsu.edu.cn/raspbian/raspbian buster/main armhf libpcre32-3 armhf 2:8.39-12 [227 kB]
获取:13 http://mirrors.sjtug.sjtu.edu.cn/raspbian/raspbian buster/main armhf libffi-dev armhf 3.2.1-9 [159 kB]
获取:16 http://mirrors.sjtug.sjtu.edu.cn/raspbian/raspbian buster/main armhf libpcre16-3 armhf 2:8.39-12 [234 kB ]
获取:19 http://mirrors.neusoft.edu.cn/raspbian/raspbian buster/main armhf libpcre3-dev armhf 2:8.39-12 [564 kB]
获取:18 http://mirrors.sjtug.sjtu.edu.cn/raspbian/raspbian buster/main armhf libpcrecpp0v5 armhf 2:8.39-12 [150 kB]
获取:20 http://mirrors.zju.edu.cn/raspbian/raspbian buster/main armhf libsepol1-dev armhf 2.8-1 [309 kB]
获取:21 http://mirrors.bfsu.edu.cn/raspbian/raspbian buster/main armhf libselinux1-dev armhf 2.8-1+b1 [156 kB]
获取:22 http://mirrors.sjtug.sjtu.edu.cn/raspbian/raspbian buster/main armhf libglib2.0-dev armhf 2.58.3-2+deb10 u2 [1,372 kB]
已下载 6,451 kB,耗时 18秒 (350 kB/s)
正在选中未选择的软件包 uuid-dev:armhf。
(正在读取数据库 … 系统当前共安装有 163693 个文件和目录。)
准备解压 …/00-uuid-dev_2.33.1-0.1_armhf.deb …
正在解压 uuid-dev:armhf (2.33.1-0.1) …
正在选中未选择的软件包 libblkid-dev:armhf。
准备解压 …/01-libblkid-dev_2.33.1-0.1_armhf.deb …
正在解压 libblkid-dev:armhf (2.33.1-0.1) …
正在选中未选择的软件包 liblzo2-2:armhf。
准备解压 …/02-liblzo2-2_2.10-0.1_armhf.deb …
正在解压 liblzo2-2:armhf (2.10-0.1) …
正在选中未选择的软件包 libcairo-script-interpreter2:armhf。
准备解压 …/03-libcairo-script-interpreter2_1.16.0-4+rpt1_armhf.deb …
正在解压 libcairo-script-interpreter2:armhf (1.16.0-4+rpt1) …
正在选中未选择的软件包 libfontconfig1-dev:armhf。
准备解压 …/04-libfontconfig1-dev_2.13.1-2_armhf.deb …
正在解压 libfontconfig1-dev:armhf (2.13.1-2) …
正在选中未选择的软件包 libxrender-dev:armhf。
准备解压 …/05-libxrender-dev_1%3a0.9.10-1_armhf.deb …
正在解压 libxrender-dev:armhf (1:0.9.10-1) …
正在选中未选择的软件包 x11proto-xext-dev。
准备解压 …/06-x11proto-xext-dev_2018.4-4_all.deb …
正在解压 x11proto-xext-dev (2018.4-4) …
正在选中未选择的软件包 libxext-dev:armhf。
准备解压 …/07-libxext-dev_2%3a1.3.3-1+b2_armhf.deb …
正在解压 libxext-dev:armhf (2:1.3.3-1+b2) …
正在选中未选择的软件包 libpixman-1-dev:armhf。
准备解压 …/08-libpixman-1-dev_0.36.0-1+rpt1_armhf.deb …
正在解压 libpixman-1-dev:armhf (0.36.0-1+rpt1) …
正在选中未选择的软件包 libxcb-render0-dev:armhf。
准备解压 …/09-libxcb-render0-dev_1.13.1-2_armhf.deb …
正在解压 libxcb-render0-dev:armhf (1.13.1-2) …
正在选中未选择的软件包 libxcb-shm0-dev:armhf。
准备解压 …/10-libxcb-shm0-dev_1.13.1-2_armhf.deb …
正在解压 libxcb-shm0-dev:armhf (1.13.1-2) …
正在选中未选择的软件包 libffi-dev:armhf。
准备解压 …/11-libffi-dev_3.2.1-9_armhf.deb …
正在解压 libffi-dev:armhf (3.2.1-9) …
正在选中未选择的软件包 libglib2.0-dev-bin。
准备解压 …/12-libglib2.0-dev-bin_2.58.3-2+deb10u2_armhf.deb …
正在解压 libglib2.0-dev-bin (2.58.3-2+deb10u2) …
正在选中未选择的软件包 libmount-dev:armhf。
准备解压 …/13-libmount-dev_2.33.1-0.1_armhf.deb …
正在解压 libmount-dev:armhf (2.33.1-0.1) …
正在选中未选择的软件包 libpcre16-3:armhf。
准备解压 …/14-libpcre16-3_2%3a8.39-12_armhf.deb …
正在解压 libpcre16-3:armhf (2:8.39-12) …
正在选中未选择的软件包 libpcre32-3:armhf。
准备解压 …/15-libpcre32-3_2%3a8.39-12_armhf.deb …
正在解压 libpcre32-3:armhf (2:8.39-12) …
正在选中未选择的软件包 libpcrecpp0v5:armhf。
准备解压 …/16-libpcrecpp0v5_2%3a8.39-12_armhf.deb …
正在解压 libpcrecpp0v5:armhf (2:8.39-12) …
正在选中未选择的软件包 libpcre3-dev:armhf。
准备解压 …/17-libpcre3-dev_2%3a8.39-12_armhf.deb …
正在解压 libpcre3-dev:armhf (2:8.39-12) …
正在选中未选择的软件包 libsepol1-dev:armhf。
准备解压 …/18-libsepol1-dev_2.8-1_armhf.deb …
正在解压 libsepol1-dev:armhf (2.8-1) …
正在选中未选择的软件包 libselinux1-dev:armhf。
准备解压 …/19-libselinux1-dev_2.8-1+b1_armhf.deb …
正在解压 libselinux1-dev:armhf (2.8-1+b1) …
正在选中未选择的软件包 libglib2.0-dev:armhf。
准备解压 …/20-libglib2.0-dev_2.58.3-2+deb10u2_armhf.deb …
正在解压 libglib2.0-dev:armhf (2.58.3-2+deb10u2) …
正在选中未选择的软件包 libcairo2-dev:armhf。
准备解压 …/21-libcairo2-dev_1.16.0-4+rpt1_armhf.deb …
正在解压 libcairo2-dev:armhf (1.16.0-4+rpt1) …
正在设置 libpcrecpp0v5:armhf (2:8.39-12) …
正在设置 libglib2.0-dev-bin (2.58.3-2+deb10u2) …
正在设置 libpixman-1-dev:armhf (0.36.0-1+rpt1) …
正在设置 libpcre16-3:armhf (2:8.39-12) …
正在设置 libsepol1-dev:armhf (2.8-1) …
正在设置 liblzo2-2:armhf (2.10-0.1) …
正在设置 libffi-dev:armhf (3.2.1-9) …
正在设置 libxcb-shm0-dev:armhf (1.13.1-2) …
正在设置 uuid-dev:armhf (2.33.1-0.1) …
正在设置 libpcre32-3:armhf (2:8.39-12) …
正在设置 libxcb-render0-dev:armhf (1.13.1-2) …
正在设置 x11proto-xext-dev (2018.4-4) …
正在设置 libxrender-dev:armhf (1:0.9.10-1) …
正在设置 libcairo-script-interpreter2:armhf (1.16.0-4+rpt1) …
正在设置 libblkid-dev:armhf (2.33.1-0.1) …
正在设置 libfontconfig1-dev:armhf (2.13.1-2) …
正在设置 libpcre3-dev:armhf (2:8.39-12) …
正在设置 libxext-dev:armhf (2:1.3.3-1+b2) …
正在设置 libmount-dev:armhf (2.33.1-0.1) …
正在设置 libselinux1-dev:armhf (2.8-1+b1) …
正在设置 libglib2.0-dev:armhf (2.58.3-2+deb10u2) …
正在处理用于 install-info (6.5.0.dfsg.1-4+b1) 的触发器 …
正在处理用于 libglib2.0-0:armhf (2.58.3-2+deb10u2) 的触发器 …
正在处理用于 libc-bin (2.28-10+rpi1) 的触发器 …
正在处理用于 man-db (2.8.5-2) 的触发器 …
正在设置 libcairo2-dev:armhf (1.16.0-4+rpt1) …
pi@raspberrypi:~ $ sudo apt install ffmpeg
正在读取软件包列表… 完成
正在分析软件包的依赖关系树
正在读取状态信息… 完成
ffmpeg 已经是最新版 (7:4.1.6-1~deb10u1+rpt1)。
升级了 0 个软件包,新安装了 0 个软件包,要卸载 0 个软件包,有 0 个软件包未被升级。
pi@raspberrypi:~ $ sudo apt-get install sox
正在读取软件包列表… 完成
正在分析软件包的依赖关系树
正在读取状态信息… 完成
将会同时安装下列软件:
libopencore-amrnb0 libopencore-amrwb0 libsox-fmt-alsa libsox-fmt-base libsox3
建议安装:
libsox-fmt-all
下列【新】软件包将被安装:
libopencore-amrnb0 libopencore-amrwb0 libsox-fmt-alsa libsox-fmt-base libsox3 sox
升级了 0 个软件包,新安装了 6 个软件包,要卸载 0 个软件包,有 0 个软件包未被升级。
需要下载 607 kB 的归档。
解压缩后会消耗 1,309 kB 的额外空间。
您希望继续执行吗? [Y/n] y
获取:2 http://mirrors.sjtug.sjtu.edu.cn/raspbian/raspbian buster/main armhf libopencore-amrwb0 armhf 0.1.3-2.1 [42.0 kB]
获取:1 http://mirrors.nju.edu.cn/raspbian/raspbian buster/main armhf libopencore-amrnb0 armhf 0.1.3-2.1 [80.4 kB]
获取:3 http://mirrors.bfsu.edu.cn/raspbian/raspbian buster/main armhf libsox3 armhf 14.4.2+git20190427-1 [226 kB]
获取:4 http://mirrors.sjtug.sjtu.edu.cn/raspbian/raspbian buster/main armhf libsox-fmt-alsa armhf 14.4.2+git20190427-1 [51.2 kB]
获取:5 http://mirrors.neusoft.edu.cn/raspbian/raspbian buster/main armhf libsox-fmt-base armhf 14.4.2+git20190427-1 [68.4 kB]
获取:6 http://mirrors.tuna.tsinghua.edu.cn/raspbian/raspbian buster/main armhf sox armhf 14.4.2+git20190427-1 [139 kB]
已下载 607 kB,耗时 4秒 (145 kB/s)
正在选中未选择的软件包 libopencore-amrnb0:armhf。
(正在读取数据库 … 系统当前共安装有 165166 个文件和目录。)
准备解压 …/0-libopencore-amrnb0_0.1.3-2.1_armhf.deb …
正在解压 libopencore-amrnb0:armhf (0.1.3-2.1) …
正在选中未选择的软件包 libopencore-amrwb0:armhf。
准备解压 …/1-libopencore-amrwb0_0.1.3-2.1_armhf.deb …
正在解压 libopencore-amrwb0:armhf (0.1.3-2.1) …
正在选中未选择的软件包 libsox3:armhf。
准备解压 …/2-libsox3_14.4.2+git20190427-1_armhf.deb …
正在解压 libsox3:armhf (14.4.2+git20190427-1) …
正在选中未选择的软件包 libsox-fmt-alsa:armhf。
准备解压 …/3-libsox-fmt-alsa_14.4.2+git20190427-1_armhf.deb …
正在解压 libsox-fmt-alsa:armhf (14.4.2+git20190427-1) …
正在选中未选择的软件包 libsox-fmt-base:armhf。
准备解压 …/4-libsox-fmt-base_14.4.2+git20190427-1_armhf.deb …
正在解压 libsox-fmt-base:armhf (14.4.2+git20190427-1) …
正在选中未选择的软件包 sox。
准备解压 …/5-sox_14.4.2+git20190427-1_armhf.deb …
正在解压 sox (14.4.2+git20190427-1) …
正在设置 libsox3:armhf (14.4.2+git20190427-1) …
正在设置 libopencore-amrwb0:armhf (0.1.3-2.1) …
正在设置 libsox-fmt-alsa:armhf (14.4.2+git20190427-1) …
正在设置 libopencore-amrnb0:armhf (0.1.3-2.1) …
正在设置 libsox-fmt-base:armhf (14.4.2+git20190427-1) …
正在设置 sox (14.4.2+git20190427-1) …
正在处理用于 libc-bin (2.28-10+rpi1) 的触发器 …
正在处理用于 man-db (2.8.5-2) 的触发器 …
正在处理用于 mime-support (3.62) 的触发器 …
pi@raspberrypi:~ $ pip install manimgl
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Collecting manimgl
Downloading https://files.pythonhosted.org/packages/79/a2/5d3c21e5b51367af09a0159b0da76ca76b9ef6f51d1e6b5e4bb8e8779e6e/manimgl-1.0.0.tar.gz (21.2MB)

100% |████████████████████████████████| 21.2MB 16kB/s

Requirement already satisfied: Pillow in /usr/lib/python2.7/dist-packages (from manimgl) (5.4.1)
Collecting PyOpenGL (from manimgl)
Downloading https://files.pythonhosted.org/packages/7e/78/2bc24caecba024f7d128030451899531cd4c2a2a2bad342d5e5010089324/PyOpenGL-3.1.5-py2-none-any.whl (2.4MB)

100% |████████████████████████████████| 2.4MB 73kB/s

Requirement already satisfied: argparse in /usr/lib/python2.7 (from manimgl) (1.2.1)
Collecting colour (from manimgl)
Downloading https://files.pythonhosted.org/packages/74/46/e81907704ab203206769dee1385dc77e1407576ff8f50a0681d0a6b541be/colour-0.1.5-py2.py3-none-any.whl
Collecting ipython (from manimgl)
Downloading https://files.pythonhosted.org/packages/ce/2c/2849a2b37024a01a847c87d81825c0489eb22ffc6416cac009bf281ea838/ipython-5.10.0-py2-none-any.whl (760kB)

100% |████████████████████████████████| 768kB 140kB/s

Collecting manimpango=0.2.0 (from manimgl) (from versions: )
No matching distribution found for manimpango=0.2.0 (from manimgl)
Downloading https://www.piwheels.org/simple/manimpango/ManimPango-0.2.4-cp37-cp37m-linux_armv7l.whl (286kB)

100% |████████████████████████████████| 286kB 243kB/s

Collecting PyOpenGL (from manimgl)
Downloading https://files.pythonhosted.org/packages/47/9a/8d9364533ebcaa13621994a63dcc6a6051e27671ae5e1715dac4af18cac2/PyOpenGL-3.1.5-py3-none-any.whl (2.4MB)

100% |████████████████████████████████| 2.4MB 175kB/s

Collecting progressbar (from manimgl)
Downloading https://www.piwheels.org/simple/progressbar/progressbar-2.5-py3-none-any.whl
Collecting sympy (from manimgl)
Downloading https://files.pythonhosted.org/packages/ff/69/b16fc81b939d3efdd0b552f2e3e54f7fa1423d0c320cced2e69e675dde26/sympy-1.7.1-py3-none-any.whl (5.9MB)

100% |████████████████████████████████| 5.9MB 74kB/s

Collecting moderngl-window (from manimgl)
Downloading https://files.pythonhosted.org/packages/61/79/2178d46ee8f80bd1e895d3c7baf8618ff9add000a8c944a35f0252d7d53c/moderngl_window-2.3.0-py3-none-any.whl (126kB)

100% |████████████████████████████████| 133kB 1.2MB/s

Collecting validators (from manimgl)
Downloading https://files.pythonhosted.org/packages/db/2f/7fed3ee94ad665ad2c1de87f858f10a7785251ff75b4fd47987888d07ef1/validators-0.18.2-py3-none-any.whl
Requirement already satisfied: numpy in /usr/lib/python3/dist-packages (from manimgl) (1.16.2)
Collecting tqdm (from manimgl)
Downloading https://files.pythonhosted.org/packages/f8/3e/2730d0effc282960dbff3cf91599ad0d8f3faedc8e75720fdf224b31ab24/tqdm-4.59.0-py2.py3-none-any.whl (74kB)

100% |████████████████████████████████| 81kB 1.8MB/s

Collecting scipy (from manimgl)
Downloading https://www.piwheels.org/simple/scipy/scipy-1.6.1-cp37-cp37m-linux_armv7l.whl (62.0MB)

100% |████████████████████████████████| 62.0MB 7.4kB/s

Collecting mapbox-earcut (from manimgl)
Downloading https://www.piwheels.org/simple/mapbox-earcut/mapbox_earcut-0.12.10-cp37-cp37m-linux_armv7l.whl (51kB)

100% |████████████████████████████████| 61kB 80kB/s

Requirement already satisfied: Pillow in /usr/lib/python3/dist-packages (from manimgl) (5.4.1)
Collecting screeninfo (from manimgl)
Downloading https://www.piwheels.org/simple/screeninfo/screeninfo-0.6.7-py3-none-any.whl
Requirement already satisfied: matplotlib in /usr/lib/python3/dist-packages (from manimgl) (3.0.2)
Collecting colour (from manimgl)
Using cached https://files.pythonhosted.org/packages/74/46/e81907704ab203206769dee1385dc77e1407576ff8f50a0681d0a6b541be/colour-0.1.5-py2.py3-none-any.whl
Collecting argparse (from manimgl)
Downloading https://files.pythonhosted.org/packages/f2/94/3af39d34be01a24a6e65433d19e107099374224905f1e0cc6bbe1fd22a2f/argparse-1.4.0-py2.py3-none-any.whl
Collecting pydub (from manimgl)
Downloading https://files.pythonhosted.org/packages/a6/53/d78dc063216e62fc55f6b2eebb447f6a4b0a59f55c8406376f76bf959b08/pydub-0.25.1-py2.py3-none-any.whl
Requirement already satisfied: ipython in /usr/lib/python3/dist-packages (from manimgl) (5.8.0)
Collecting moderngl (from manimgl)
Downloading https://www.piwheels.org/simple/moderngl/moderngl-5.6.4-cp37-cp37m-linux_armv7l.whl (864kB)

100% |████████████████████████████████| 870kB 169kB/s

Collecting mpmath>=0.19 (from sympy->manimgl)
Downloading https://files.pythonhosted.org/packages/d4/cf/3965bddbb4f1a61c49aacae0e78fd1fe36b5dc36c797b31f30cf07dcbbb7/mpmath-1.2.1-py3-none-any.whl (532kB)

100% |████████████████████████████████| 542kB 698kB/s

Collecting pyglet=1.5.8 (from moderngl-window->manimgl)
Downloading https://files.pythonhosted.org/packages/81/5e/aef9e460989e4b832215d5fcee3ea9b0629e9bce8607284d9c1021b6a251/pyglet-1.5.15-py3-none-any.whl (1.1MB)

100% |████████████████████████████████| 1.1MB 367kB/s

Collecting pyrr=0.10.3 (from moderngl-window->manimgl)
Downloading https://files.pythonhosted.org/packages/80/d4/09bb74e93f9f677eadcf9ddb92681755f75e0f354a1b904f1913e32ca1b2/pyrr-0.10.3-py3-none-any.whl (46kB)

100% |████████████████████████████████| 51kB 2.1MB/s

Requirement already satisfied: decorator>=3.4.0 in /usr/lib/python3/dist-packages (from validators->manimgl) (4.3.0)
Requirement already satisfied: six>=1.4.0 in /usr/lib/python3/dist-packages (from validators->manimgl) (1.12.0)
Requirement already satisfied: pexpect in /usr/lib/python3/dist-packages (from ipython->manimgl) (4.6.0)
Collecting glcontext=2 (from moderngl->manimgl)
Downloading https://www.piwheels.org/simple/glcontext/glcontext-2.3.2-cp37-cp37m-linux_armv7l.whl (65kB)

100% |████████████████████████████████| 71kB 110kB/s

Collecting multipledispatch (from pyrr=0.10.3->moderngl-window->manimgl)
Downloading https://files.pythonhosted.org/packages/89/79/429ecef45fd5e4504f7474d4c3c3c4668c267be3370e4c2fd33e61506833/multipledispatch-0.6.0-py3-none-any.whl
Building wheels for collected packages: pyyaml
Running setup.py bdist_wheel for pyyaml … done
Stored in directory: /home/pi/.cache/pip/wheels/2a/d4/92/cf299bdf4162957ca8126b46e913e29f76a4f17ca762c45028
Successfully built pyyaml
scipy 1.6.1 has requirement numpy>=1.16.5, but you’ll have numpy 1.16.2 which is incompatible.
Installing collected packages: pyyaml, manimpango, PyOpenGL, progressbar, mpmath, sympy, glcontext, moderngl, pyglet, multipledispatch, pyrr, moderngl-window, validators, tqdm, scipy, mapbox-earcut, screeninfo, colour, argparse, pydub, manimgl
The script isympy is installed in ‘/home/pi/.local/bin’ which is not on PATH.
Consider adding this directory to PATH or, if you prefer to suppress this warning, use –no-warn-script-location.
The script tqdm is installed in ‘/home/pi/.local/bin’ which is not on PATH.
Consider adding this directory to PATH or, if you prefer to suppress this warning, use –no-warn-script-location.
The scripts manim-render and manimgl are installed in ‘/home/pi/.local/bin’ which is not on PATH.
Consider adding this directory to PATH or, if you prefer to suppress this warning, use –no-warn-script-location.
Successfully installed PyOpenGL-3.1.5 argparse-1.4.0 colour-0.1.5 glcontext-2.3.2 manimgl-1.0.0 manimpango-0.2.4 mapbox-earcut-0.12.10 moderngl-5.6.4 moderngl-window-2.3.0 mpmath-1.2.1 multipledispatch-0.6.0 progressbar-2.5 pydub-0.25.1 pyglet-1.5.15 pyrr-0.10.3 pyyaml-5.4.1 scipy-1.6.1 screeninfo-0.6.7 sympy-1.7.1 tqdm-4.59.0 validators-0.18.2


---

但是又提示另一个问题`scipy 1.6.1 has requirement numpy>=1.16.5, but you'll have numpy 1.16.2 which is incompatible.`

说明numpy版本过低,使用命令`pip3 install --user -U numpy`升级

---

此外还提示

The script isympy is installed in ‘/home/pi/.local/bin’ which is not on PATH.
Consider adding this directory to PATH or, if you prefer to suppress this warning, use –no-warn-script-location.
The script tqdm is installed in ‘/home/pi/.local/bin’ which is not on PATH.
Consider adding this directory to PATH or, if you prefer to suppress this warning, use –no-warn-script-location.
The scripts manim-render and manimgl are installed in ‘/home/pi/.local/bin’ which is not on PATH.
Consider adding this directory to PATH or, if you prefer to suppress this warning, use –no-warn-script-location.


使用`echo 'export PATH=/home/pi/.local/bin:$PATH' >>~/.bashrc`

`source ~/.bashrc`

`pip3 uninstall manimgl`

`pip3 install manimgl`

---

报错

pi@raspberrypi:~ $ manimgl
Traceback (most recent call last):
File “/home/pi/.local/lib/python3.7/site-packages/numpy/core/__init__.py”, line 22, in

from . import multiarray

File “/home/pi/.local/lib/python3.7/site-packages/numpy/core/multiarray.py”, line 12, in

from . import overrides

File “/home/pi/.local/lib/python3.7/site-packages/numpy/core/overrides.py”, line 7, in

from numpy.core._multiarray_umath import (

ImportError: libf77blas.so.3: cannot open shared object file: No such file or directory

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “/home/pi/.local/bin/manimgl”, line 6, in

from manimlib.__main__ import main

File “/home/pi/.local/lib/python3.7/site-packages/manimlib/__init__.py”, line 1, in

from manimlib.constants import *

File “/home/pi/.local/lib/python3.7/site-packages/manimlib/constants.py”, line 1, in

import numpy as np

File “/home/pi/.local/lib/python3.7/site-packages/numpy/__init__.py”, line 145, in

from . import core

File “/home/pi/.local/lib/python3.7/site-packages/numpy/core/__init__.py”, line 48, in

raise ImportError(msg)

ImportError:

IMPORTANT: PLEASE READ THIS FOR ADVICE ON HOW TO SOLVE THIS ISSUE!

Importing the numpy C-extensions failed. This error can happen for
many reasons, often due to issues with your setup or how NumPy was
installed.

We have compiled some common reasons and troubleshooting tips at:

https://numpy.org/devdocs/user/troubleshooting-importerror.html

Please note and check the following:

  • The Python version is: Python3.7 from “/usr/bin/python3”
  • The NumPy version is: “1.20.1”

and make sure that they are the versions you expect.
Please carefully study the documentation linked above for further help.

Original error was: libf77blas.so.3: cannot open shared object file: No such file or directory


根据提示前往网址[https://numpy.org/devdocs/user/troubleshooting-importerror.html](https://numpy.org/devdocs/user/troubleshooting-importerror.html)

发现有针对树莓派的典型报错:

`libf77blas.so.3: cannot open shared object file: No such file or directory`

一看果然是这个问题

官方提供的解决方法是:`sudo apt-get install libatlas-base-dev`

---

按照上面的方法解决了numpy报错之后,另外一个问题依然存在

pi@raspberrypi:~ $ sudo apt-get install libatlas-base-dev
正在读取软件包列表… 完成
正在分析软件包的依赖关系树
正在读取状态信息… 完成
将会同时安装下列软件:
libatlas3-base
建议安装:
libatlas-doc liblapack-doc
下列【新】软件包将被安装:
libatlas-base-dev libatlas3-base
升级了 0 个软件包,新安装了 2 个软件包,要卸载 0 个软件包,有 0 个软件包未被升级。
需要下载 5,365 kB 的归档。
解压缩后会消耗 32.1 MB 的额外空间。
您希望继续执行吗? [Y/n] y
获取:1 http://mirrors.bfsu.edu.cn/raspbian/raspbian buster/main armhf libatlas3-base armhf 3.10.3-8+rpi1 [2,399 kB]
获取:2 http://mirrors.sjtug.sjtu.edu.cn/raspbian/raspbian buster/main armhf libatlas-base-dev armhf 3.10.3-8+rpi1 [2,966 kB]
已下载 5,365 kB,耗时 4秒 (1,314 kB/s)
正在选中未选择的软件包 libatlas3-base:armhf。
(正在读取数据库 … 系统当前共安装有 165238 个文件和目录。)
准备解压 …/libatlas3-base_3.10.3-8+rpi1_armhf.deb …
正在解压 libatlas3-base:armhf (3.10.3-8+rpi1) …
正在选中未选择的软件包 libatlas-base-dev:armhf。
准备解压 …/libatlas-base-dev_3.10.3-8+rpi1_armhf.deb …
正在解压 libatlas-base-dev:armhf (3.10.3-8+rpi1) …
正在设置 libatlas3-base:armhf (3.10.3-8+rpi1) …
update-alternatives: 使用 /usr/lib/arm-linux-gnueabihf/atlas/libblas.so.3 来在自动模式中提供 /usr/lib/arm-linux-gnueabihf/libblas.so.3 (libblas.so.3-arm-linux-gnueabihf)
update-alternatives: 使用 /usr/lib/arm-linux-gnueabihf/atlas/liblapack.so.3 来在自动模式中提供 /usr/lib/arm-linux-gnueabihf/liblapack.so.3 (liblapack.so.3-arm-linux-gnueabihf)
正在设置 libatlas-base-dev:armhf (3.10.3-8+rpi1) …
update-alternatives: 使用 /usr/lib/arm-linux-gnueabihf/atlas/libblas.so 来在自动模式中提供 /usr/lib/arm-linux-gnueabihf/libblas.so (libblas.so-arm-linux-gnueabihf)
update-alternatives: 使用 /usr/lib/arm-linux-gnueabihf/atlas/liblapack.so 来在自动模式中提供 /usr/lib/arm-linux-gnueabihf/liblapack.so (liblapack.so-arm-linux-gnueabihf)
正在处理用于 libc-bin (2.28-10+rpi1) 的触发器 …
pi@raspberrypi:~ $ manimgl
Traceback (most recent call last):
File “/home/pi/.local/bin/manimgl”, line 6, in

from manimlib.__main__ import main

File “/home/pi/.local/lib/python3.7/site-packages/manimlib/__init__.py”, line 19, in

from manimlib.window import *

File “/home/pi/.local/lib/python3.7/site-packages/manimlib/window.py”, line 2, in

from moderngl_window.context.pyglet.window import Window as PygletWindow

File “/home/pi/.local/lib/python3.7/site-packages/moderngl_window/context/pyglet/__init__.py”, line 1, in

from .keys import Keys  # noqa

File “/home/pi/.local/lib/python3.7/site-packages/moderngl_window/context/pyglet/keys.py”, line 12, in

from pyglet.window import key

File “/home/pi/.local/lib/python3.7/site-packages/pyglet/window/__init__.py”, line 1899, in

gl._create_shadow_window()

File “/home/pi/.local/lib/python3.7/site-packages/pyglet/gl/__init__.py”, line 206, in _create_shadow_window

_shadow_window = Window(width=1, height=1, visible=False)

File “/home/pi/.local/lib/python3.7/site-packages/pyglet/window/xlib/__init__.py”, line 173, in init

super(XlibWindow, self).__init__(*args, **kwargs)

File “/home/pi/.local/lib/python3.7/site-packages/pyglet/window/__init__.py”, line 585, in init

display = pyglet.canvas.get_display()

File “/home/pi/.local/lib/python3.7/site-packages/pyglet/canvas/__init__.py”, line 94, in get_display

return Display()

File “/home/pi/.local/lib/python3.7/site-packages/pyglet/canvas/xlib.py”, line 123, in init

raise NoSuchDisplayException('Cannot connect to "%s"' % name)

pyglet.canvas.xlib.NoSuchDisplayException: Cannot connect to “None”


---

暂时不管上述报错,直接git clone试试

`git clone https://github.com/3b1b/manim`

`cd manim`

`pip3 install -e .`

发现确实不行,之前环境配置有错

### 安装pi lite系统

怀疑是之前那个full版系统环境复杂,这次下载一个完全纯净的试试

`sudo apt-get update`

`sudo apt install python3-pip`

## 在mac系统里面安装

### 安装homebrew

[官网](https://brew.sh/index_zh-cn)

打开终端,输入`/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"`

然后安装到这一步卡住

==> Tapping homebrew/core
Cloning into ‘/usr/local/Homebrew/Library/Taps/homebrew/homebrew-core’…


此时重启终端或者打断进程,然后切换到homebrew目录:

`cd /usr/local/Homebrew/Library/Taps/homebrew`

使用`ls`查看目录是否为空,如果有文件夹则使用`rm -r homebrew-core`删除东西

`git clone https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/homebrew-core.git`

### 安装依赖

brew install ffmpeg mactex


### 安装manim

git clone https://github.com/3b1b/manim.git

cd manim


安装到这步发现没有pip,于是安装pip

curl https://bootstrap.pypa.io/get-pip.py | python3

pip3 install -e .


然后报错

hfy@HFYdeMac-mini ~ % pip3 install -e .
WARNING: pip is being invoked by an old script wrapper. This will fail in a future version of pip.
Please see https://github.com/pypa/pip/issues/5599 for advice on fixing the underlying issue.
To avoid this problem you can invoke Python with ‘-m pip’ instead of running pip directly.
Defaulting to user installation because normal site-packages is not writeable
ERROR: File “setup.py” not found. Directory cannot be installed in editable mode: /Users/hfy


于是根据说明换用`python -m pip install -e .`

manimgl example_scenes.py OpeningManimExample


但是报错

hfy@HFYdeMac-mini manim % pip3 install -e .
WARNING: pip is being invoked by an old script wrapper. This will fail in a future version of pip.
Please see https://github.com/pypa/pip/issues/5599 for advice on fixing the underlying issue.
To avoid this problem you can invoke Python with ‘-m pip’ instead of running pip directly.
Defaulting to user installation because normal site-packages is not writeable
Obtaining file:///Users/hfy/manim
Collecting argparse
Downloading argparse-1.4.0-py2.py3-none-any.whl (23 kB)
Collecting colour
Downloading colour-0.1.5-py2.py3-none-any.whl (23 kB)
Collecting numpy
Downloading numpy-1.20.1-cp38-cp38-macosx_10_9_x86_64.whl (16.0 MB)

 |████████████████████████████████| 16.0 MB 378 kB/s 

Collecting Pillow
Downloading Pillow-8.1.2-cp38-cp38-macosx_10_10_x86_64.whl (2.2 MB)

 |████████████████████████████████| 2.2 MB 423 kB/s 

Collecting scipy
Downloading scipy-1.6.1-cp38-cp38-macosx_10_9_x86_64.whl (30.8 MB)

 |████████████████████████████████| 30.8 MB 379 kB/s 

Collecting sympy
Downloading sympy-1.7.1-py3-none-any.whl (5.9 MB)

 |████████████████████████████████| 5.9 MB 415 kB/s 

Collecting tqdm
Downloading tqdm-4.59.0-py2.py3-none-any.whl (74 kB)

 |████████████████████████████████| 74 kB 616 kB/s 

Collecting mapbox-earcut
Downloading mapbox_earcut-0.12.10-cp38-cp38-macosx_10_9_x86_64.whl (55 kB)

 |████████████████████████████████| 55 kB 650 kB/s 

Collecting matplotlib
Downloading matplotlib-3.3.4-cp38-cp38-macosx_10_9_x86_64.whl (8.5 MB)

 |████████████████████████████████| 8.5 MB 249 kB/s 

Collecting moderngl
Downloading moderngl-5.6.4-cp38-cp38-macosx_10_9_x86_64.whl (144 kB)

 |████████████████████████████████| 144 kB 347 kB/s 

Collecting moderngl_window
Downloading moderngl_window-2.3.0-py3-none-any.whl (126 kB)

 |████████████████████████████████| 126 kB 439 kB/s 

Collecting pydub
Downloading pydub-0.25.1-py2.py3-none-any.whl (32 kB)
Collecting pyyaml
Downloading PyYAML-5.4.1-cp38-cp38-macosx_10_9_x86_64.whl (253 kB)

 |████████████████████████████████| 253 kB 311 kB/s 

Collecting screeninfo
Downloading screeninfo-0.6.7.tar.gz (7.3 kB)
Collecting validators
Downloading validators-0.18.2-py3-none-any.whl (19 kB)
Collecting ipython
Downloading ipython-7.21.0-py3-none-any.whl (784 kB)

 |████████████████████████████████| 784 kB 429 kB/s 

Collecting PyOpenGL
Downloading PyOpenGL-3.1.5-py3-none-any.whl (2.4 MB)

 |████████████████████████████████| 2.4 MB 441 kB/s 

Collecting manimpango

2021 年 4 月 5 日 245
曲淡歌
曲淡歌@admin

2021 年 2 月 27 日

树莓派安装openwrt并扩容overlay分区 

安装的参考

如何安装

步骤

  1. 使用disk genius把内存卡的分区删除,新建一个分区并采用fat32格式化
  2. 用win32diskimage写入镜像

出现问题:

  1. 其他电脑连接wifi
    后无法获取ip,而路由器插上网线后在上级路由里面也查不到ip

解决方案:

连接wifi【openwrt】后,手动修改电脑的ip:192.168.10.x,子网掩码24,网关192.168.10.1,然后就和op在同一网段了,此时访问192.168.10.1即可。

然后在op设置界面:【网络】-【接口】-【LAN】-【修改】里面,将【IPv4网关】设置为192.168.1.1,将【使用自定义的 DNS 服务器】设置为114.114.114.114,此时op便可以获取上级路由的网络(如果不清楚上级路由的情况,则改为dhcp协议,然后用ip扫描来找到op的lan地址)

扩容的参考资料

“【转载】树莓派安装openwrt后扩容-参考资料”

“【转载】openwrt的overlay分区不足解决方法”

使用fdisk扩容的尝试(使用另一台linux)

确定内存卡的盘符

拔掉openwrt的内存卡,换上linux的卡,输入命令:df -h查看硬盘情况

判断/dev/sda是装有openwrt的内存卡,其中2是装有系统的部分(猜测)

卸载盘符

umount /dev/sda2

用fdisk命令开始重新分区

  1. 进入分区程序sudo fdisk /dev/sda
  2. 查看当前分区情况:p
#终端
pi@raspberrypi:~ $ sudo fdisk /dev/sda
Welcome to fdisk (util-linux 2.33.1).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.
Command (m for help): p
Disk /dev/sda: 7.4 GiB, 7983857664 bytes, 15593472 sectors
Disk model: Storage Device
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0xf222735e
Device     Boot   Start      End  Sectors  Size Id Type
/dev/sda1  *       8192   139263   131072   64M  c W95 FAT32 (LBA)
/dev/sda2        147456  2113535  1966080  960M 83 Linux
/dev/sda3       2113536 15593471 13479936  6.4G 83 Linux

删除分区2、3

删除分区:d

选择删除分区2:2

重复一次,删除3

重新新建分区2

然后新建分区:

分区类型选择主分区:p

分区号输入2:

起始扇区选择原来的点:147456

最后一个扇区选择默认:enter

这样就新建了一个分区2,并且分区包含了剩下的全部空间。

Device     Boot   Start      End  Sectors  Size Id Type
/dev/sda1  *       8192   139263   131072   64M  c W95 FAT32 (LBA)
/dev/sda2        147456  2113535  1966080  960M 83 Linux
/dev/sda3       2113536 15593471 13479936  6.4G 83 Linux

Command (m for help): d
Partition number (1-3, default 3): 3

Partition 3 has been deleted.

Command (m for help): d
Partition number (1,2, default 2): 2

Partition 2 has been deleted.

Command (m for help): n
Partition type
   p   primary (1 primary, 0 extended, 3 free)
   e   extended (container for logical partitions)
Select (default p): p
Partition number (2-4, default 2): 2
First sector (2048-15593471, default 2048): 147456
Last sector, +/-sectors or +/-size{K,M,G,T,P} (147456-15593471, default 15593471):

Created a new partition 2 of type 'Linux' and of size 7.4 GiB.
Partition #2 contains a squashfs signature.

Do you want to remove the signature? [Y]es/[N]o: n

Command (m for help): w

The partition table has been altered.
Syncing disks.

使修改生效

sudo e2fsck /dev/sda2
sudo resize2fs /dev/sda2

出现错误

pi@raspberrypi:~ $ sudo e2fsck /dev/sda2
e2fsck 1.44.5 (15-Dec-2018)
ext2fs_open2: Bad magic number in super-block
e2fsck: Superblock invalid, trying backup blocks...
e2fsck: Bad magic number in super-block while trying to open /dev/sda2

The superblock could not be read or does not describe a valid ext2/ext3/ext4
filesystem.  If the device is valid and it really contains an ext2/ext3/ext4
filesystem (and not swap or ufs or something else), then the superblock
is corrupt, and you might try running e2fsck with an alternate superblock:
    e2fsck -b 8193 
 or
    e2fsck -b 32768 

/dev/sda2 contains a squashfs file system
pi@raspberrypi:~ $ sudo resize2fs /dev/sda2
resize2fs 1.44.5 (15-Dec-2018)
resize2fs: Bad magic number in super-block while trying to open /dev/sda2
Couldn't find valid filesystem superblock.

这个方法暂时无法使用

在openwrt里面直接扩容

查看设备

输入lsblk

得到

OpenWrt# lsblk
\NAME        MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
loop0         7:0    0 787.3M  0 loop /overlay
mmcblk0     179:0    0   7.4G  0 disk
├─mmcblk0p1 179:1    0    64M  0 part /boot
└─mmcblk0p2 179:2    0   960M  0 part /rom

得知可以扩容的id为mmcblk0

开始扩容

fdisk /dev/mmcblk0

使用p查看分区

得到:

Command (m for help): p
Disk /dev/mmcblk0: 7.45 GiB, 7983857664 bytes, 15593472 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x5452574f

Device         Boot  Start     End Sectors  Size Id Type
/dev/mmcblk0p1 *      8192  139263  131072   64M  c W95 FAT32 (LBA)
/dev/mmcblk0p2      147456 2113535 1966080  960M 83 Linux

得知还有6个多G的空间可用

mkfs.ext4 /dev/mmcblk0p3

第一次重启前全程记录

Using username "root".
root@192.168.1.177's password:
OpenWrt# df -h
Filesystem                Size      Used Available Use% Mounted on
/dev/root               172.8M    172.8M         0 100% /rom
tmpfs                     1.9G      7.8M      1.8G   0% /tmp
/dev/loop0              785.3M    139.8M    645.4M  18% /overlay
overlayfs:/overlay      785.3M    139.8M    645.4M  18% /
/dev/mmcblk0p1           63.9M     17.3M     46.5M  27% /boot
tmpfs                   512.0K         0    512.0K   0% /dev
cgroup                    1.9G         0      1.9G   0% /sys/fs/cgroup
overlayfs:/overlay      785.3M    139.8M    645.4M  18% /opt/docker
OpenWrt# lsblk
\NAME        MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
loop0         7:0    0 787.3M  0 loop /overlay
mmcblk0     179:0    0   7.4G  0 disk
├─mmcblk0p1 179:1    0    64M  0 part /boot
└─mmcblk0p2 179:2    0   960M  0 part /rom
OpenWrt# \fdisk /dev/mmcblk0

Welcome to fdisk (util-linux 2.35.1).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.


Command (m for help): p
Disk /dev/mmcblk0: 7.45 GiB, 7983857664 bytes, 15593472 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x5452574f

Device         Boot  Start     End Sectors  Size Id Type
/dev/mmcblk0p1 *      8192  139263  131072   64M  c W95 FAT32 (LBA)
/dev/mmcblk0p2      147456 2113535 1966080  960M 83 Linux

Command (m for help): n
Partition type
   p   primary (2 primary, 0 extended, 2 free)
   e   extended (container for logical partitions)
Select (default p): p
Partition number (3,4, default 3):
First sector (2048-15593471, default 2048): +3G
Value out of range.
First sector (2048-15593471, default 2048): +1G
Value out of range.
First sector (2048-15593471, default 2048):
Last sector, +/-sectors or +/-size{K,M,G,T,P} (2048-15593471, default 15593471): +3G

Created a new partition 3 of type 'Linux' and of size 3 GiB.

Command (m for help): p
Disk /dev/mmcblk0: 7.45 GiB, 7983857664 bytes, 15593472 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x5452574f

Device         Boot  Start     End Sectors  Size Id Type
/dev/mmcblk0p1 *      8192  139263  131072   64M  c W95 FAT32 (LBA)
/dev/mmcblk0p2      147456 2113535 1966080  960M 83 Linux
/dev/mmcblk0p3        2048 6293503 6291456    3G 83 Linux

Partition table entries are not in disk order.

Command (m for help): w
The partition table has been altered.
Failed to add partition 3 to system: Resource busy

The kernel still uses the old partitions. The new table will be used at the next reboot.
Syncing disks.

OpenWrt# fdisk /dev/mmcblk0

Welcome to fdisk (util-linux 2.35.1).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.


Command (m for help): p
Disk /dev/mmcblk0: 7.45 GiB, 7983857664 bytes, 15593472 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x5452574f

Device         Boot  Start     End Sectors  Size Id Type
/dev/mmcblk0p1 *      8192  139263  131072   64M  c W95 FAT32 (LBA)
/dev/mmcblk0p2      147456 2113535 1966080  960M 83 Linux
/dev/mmcblk0p3        2048 6293503 6291456    3G 83 Linux

Partition table entries are not in disk order.

Command (m for help): m

Help:

  DOS (MBR)
   a   toggle a bootable flag
   b   edit nested BSD disklabel
   c   toggle the dos compatibility flag

  Generic
   d   delete a partition
   F   list free unpartitioned space
   l   list known partition types
   n   add a new partition
   p   print the partition table
   t   change a partition type
   v   verify the partition table
   i   print information about a partition

  Misc
   m   print this menu
   u   change display/entry units
   x   extra functionality (experts only)

  Script
   I   load disk layout from sfdisk script file
   O   dump disk layout to sfdisk script file

  Save & Exit
   w   write table to disk and exit
   q   quit without saving changes

  Create a new label
   g   create a new empty GPT partition table
   G   create a new empty SGI (IRIX) partition table
   o   create a new empty DOS partition table
   s   create a new empty Sun partition table


Command (m for help): d
Partition number (1-3, default 3): 3

Partition 3 has been deleted.

Command (m for help): p
Disk /dev/mmcblk0: 7.45 GiB, 7983857664 bytes, 15593472 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x5452574f

Device         Boot  Start     End Sectors  Size Id Type
/dev/mmcblk0p1 *      8192  139263  131072   64M  c W95 FAT32 (LBA)
/dev/mmcblk0p2      147456 2113535 1966080  960M 83 Linux

Command (m for help): w
The partition table has been altered.
Failed to remove partition 3 from system: No such device or address

The kernel still uses the old partitions. The new table will be used at the next reboot.
Syncing disks.

OpenWrt# fdisk /dev/mmcblk0

Welcome to fdisk (util-linux 2.35.1).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.


Command (m for help): p
Disk /dev/mmcblk0: 7.45 GiB, 7983857664 bytes, 15593472 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x5452574f

Device         Boot  Start     End Sectors  Size Id Type
/dev/mmcblk0p1 *      8192  139263  131072   64M  c W95 FAT32 (LBA)
/dev/mmcblk0p2      147456 2113535 1966080  960M 83 Linux

Command (m for help): n
Partition type
   p   primary (2 primary, 0 extended, 2 free)
   e   extended (container for logical partitions)
Select (default p): p
Partition number (3,4, default 3): 3
First sector (2048-15593471, default 2048): 2113536
Last sector, +/-sectors or +/-size{K,M,G,T,P} (2113536-15593471, default 15593471): +3G

Created a new partition 3 of type 'Linux' and of size 3 GiB.

Command (m for help): p
Disk /dev/mmcblk0: 7.45 GiB, 7983857664 bytes, 15593472 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x5452574f

Device         Boot   Start     End Sectors  Size Id Type
/dev/mmcblk0p1 *       8192  139263  131072   64M  c W95 FAT32 (LBA)
/dev/mmcblk0p2       147456 2113535 1966080  960M 83 Linux
/dev/mmcblk0p3      2113536 8404991 6291456    3G 83 Linux

Command (m for help): w
The partition table has been altered.
Syncing disks.

OpenWrt# mkfs.ext4 /dev/mmcblk0p3
mke2fs 1.45.6 (20-Mar-2020)
Discarding device blocks: done
Creating filesystem with 786432 4k blocks and 196608 inodes
Filesystem UUID: 84f1fcef-0224-4409-a211-45f800551e81
Superblock backups stored on blocks:
        32768, 98304, 163840, 229376, 294912

Allocating group tables: done
Writing inode tables: done
Creating journal (16384 blocks): done
Writing superblocks and filesystem accounting information: done

OpenWrt# reboot

重启后把以前的文件复制到扩容的文件夹

mount -t ext4 /dev/mmcblk0p3 /mnt/mmcblk0p3

发现该目录还不存在

OpenWrt# mount -t ext4 /dev/mmcblk0p3 /mnt/mmcblk0p3
mount: /mnt/mmcblk0p3: mount point does not exist.

于是先使用mkdir /mnt/mmcblk0p3mount -t ext4 /dev/mmcblk0p3 /mnt/mmcblk0p3

再使用df -h查询得到

OpenWrt# df -h
Filesystem                Size      Used Available Use% Mounted on
/dev/root               172.8M    172.8M         0 100% /rom
tmpfs                     1.9G      7.5M      1.8G   0% /tmp
/dev/loop0              785.3M    139.8M    645.4M  18% /overlay
overlayfs:/overlay      785.3M    139.8M    645.4M  18% /
/dev/mmcblk0p1           63.9M     17.3M     46.5M  27% /boot
tmpfs                   512.0K         0    512.0K   0% /dev
cgroup                    1.9G         0      1.9G   0% /sys/fs/cgroup
overlayfs:/overlay      785.3M    139.8M    645.4M  18% /opt/docker
/dev/mmcblk0p3            2.9G      9.0M      2.7G   0% /mnt/mmcblk0p3

说明已经挂载成功

然后看看loop0指向的是哪个目录,发现overlay目录为/overlay

于是将其内容拷贝,命令为:cp -r /overlay/* /mnt/mmcblk0p3

然后卸载umount /dev/mmcblk0p3

提示busy,可以参考linux挂载卸载不掉 umount target is busy

不过因为op上没有安装相应的命令,于是我先尝试reboot

重启之后发现不会自动挂载,再次手动挂载mount -t ext4 /dev/mmcblk0p3 /mnt/mmcblk0p3

再次手动卸载umount /dev/mmcblk0p3

成功

打开openwrt的管理界面

【挂载点】-【生成配置】(如果找不到后面的设备可以使用这一步)-【(/mnt/mmcblk0p3)修改】

重启之后,成功!(之前失败是因为忘记勾选启用此挂载点)

2021 年 2 月 27 日 291
曲淡歌
曲淡歌@admin

2021 年 2 月 27 日

【2021-03-08更新】关于思源笔记服务器docker的部署笔记 

思源笔记

docker服务的布置

  1. 拉取镜像b3log/siyuan
  2. 在宿主机/siyuan/conf下新建文件conf.json,并且提前创建/siyuan/data/思源笔记用户指南
  3. 输入命令docker run -v /siyuan/conf:/siyuan/conf -v /siyuan/data:/siyuan/data -p 6806:6806 b3log/siyuan --resident=true --conf=/siyuan/conf
    4.
内容为
{
   "url": "http://127.0.0.1:6806/siyuan/siyuan/思源笔记用户指南/",
   "name": "思源笔记用户指南",
   "auth": "",
   "user": "",
   "password": "",
   "path": "/siyuan/data/思源笔记用户指南"
}

然后得到我的思源笔记地址:地址

存在的问题

如图所示,无法创建新的文件夹,从而无法建立新的笔记

解决方案

参考资料:

思源笔记 docker 部署问题 – 链滴 (ld246.com)

关于完善思源笔记 dav 与文件管理的个人建议 – 链滴 (ld246.com)

思源 Docker 版不能删除配置的 dav – 链滴 (ld246.com)

有用信息

Docker 创建笔记本的话需要定死一个文件路径,类似在 Android 上那样。目前暂时还没有进行细节设计,如果目前就需要用的话请手动修改 conf.json。

在树莓派的openwrt中布置

其他流程一致,最后提示

stderr: standard_init_linux.go:211: exec user process caused "exec format error"
stderr: standard_init_linux.go:211: exec user process caused "exec format error"
stderr: standard_init_linux.go:211: exec user process caused "exec format error"

经过分析猜测问题来自于架构的不同,树莓派是arm架构,估计这个项目是x86的,于是前往dockerhub验证

不同架构下docker的兼容问题

docker run 失败 在logs中如下错误,standard_init_linux.go:211: exec user process caused “exec format error“

去github上查到一条可能相关的can’t deploy siyuan server with the docker images b3log/siyuan #1454

docker run -d -p 6806:6806 b3log/siyuan --resident=true

docker exec -it /bin/sh

应该不是这个问题,就是架构的锅

官方镜像地址

根据”#不同架构下docker的兼容问题#”

可知:

解决办法
既然问题根源找到了 ,那就好办了 ,只需要在当前arch的linux上重新docker build 就行 。

docker build相关

Docker build 命令

参考上述资料,打算使用 -f Dockerfile 文件的位置:

$ docker build -f /path/to/a/Dockerfile .

因此需要找到之前pull的image存储位置

猜测是

/opt/docker/vfs/dir/0f1818c5db9de0fcb5b31faeee1bd89cc3ac263d22e854accac223fdbf6e8ef5/

因此命令为docker build -f /opt/docker/vfs/dir/0f1818c5db9de0fcb5b31faeee1bd89cc3ac263d22e854accac223fdbf6e8ef5/

错误! dockerfile是一种特殊的文件,用来描述如何构建一个image

然后,我不会了。就这样吧,下次继续研究。

2021-03-02更新 支持docker打开本地文件啦(2:10 周三,镜像似乎还没更新)

更新日志

Adds booting param for Docker: --data for specifying the path of the data.

拉取命令docker pull b3log/siyuan

因此命令应该为:

docker run -v /siyuan/conf:/siyuan/conf -v /siyuan/data:/siyuan/data -p 6806:6806 b3log/siyuan --resident=true --conf=/siyuan/conf --data=/siyuan/data

2021-03-08 发现使用宝塔的docker管理面板无法获取最新镜像

因此使用命令docker images查看镜像

得到

[root@iz2zehokmzpppxxwrsifshz ~]# docker images
REPOSITORY                     TAG                 IMAGE ID            CREATED             SIZE
b3log/siyuan                   latest              01a241c3b07b        7 weeks ago         133MB
b3log/solo                     latest              2bc398af448b        2 months ago        143MB
radhifadlillah/shiori          latest              69e24681b088        6 months ago        422MB
moritanosuke/wallabag-docker   latest              495f85187162        4 years ago         626MB

然后使用docker rmi 删除目标镜像

这里应该为docker rmi 01a241c3b07b

然后再使用docker pull b3log/siyuan

docker run -v /siyuan/conf:/siyuan/conf -v /siyuan/data:/siyuan/data -p 6806:6806 b3log/siyuan --resident=true --conf=/siyuan/conf --data=/siyuan/data

我发现阿里云,科大的镜像加速更新都很慢,目前最好用的是网易

网易加速地址:https://hub-mirror.c.163.com/

成功进入之后发现需要用户名和密码,用户名为siyuan,密码是随机生成的,在conf.json里面查看

如何让网页版思源和我的webdav共用文件?

思路:因为webdav的目录在wwwroot下,而docker部署的在siyuan/data下,无法直接让这两个文件夹合一,那么可以使用目录链接的方式让二者共享文件吗?

方案

  1. 【不可行】重新构建docker,把数据的位置指定到webdav的目录

那么启动命令应该为:docker run -v /siyuan/conf:/siyuan/conf -v /siyuan/data:/siyuan/data -p 6806:6806 b3log/siyuan --resident=true --conf=/siyuan/conf --data=/www/wwwroot/47.93.237.242/dav

发现怎么都不行,估计是权限的问题

  1. 【可行】重建webdav,将目录改到思源的目录
    参考#搭建webdav#

将其中的代码改为:

location / {
        root /siyuan/data;
        #client_max_body_size 102400M;#大文件支持
        autoindex on;
        dav_methods PUT DELETE MKCOL COPY MOVE;
        # 需要 nginx-dav-ext-module 才有下面的选项
        dav_ext_methods PROPFIND OPTIONS LOCK UNLOCK;
        create_full_put_path  on;
    }

此时webdav的配置如下(此处在博客脱敏)
我的webdav地址(注意此处没有dav了)

id

密码

新的问题:#链接webdav后部分文件夹不可见#

连接webdav后只能看到【极客】文件夹,后来发现只要把之前的文件夹改名就能刷新出来,推测是以前的文件修改导致识别不到

保持docker开启

使用发现思源笔记的docker在有时会宕机,因此需要设置一个自动重启,使用docker container update --restart=always

输入为:docker container update --restart=always 4ec8fe06a520

#思源笔记
2021 年 2 月 27 日 313
  • ii.kiss

    2021 年 3 月 28 日

    请问具体步骤和相关设置参数都是什么?我在群晖上想安装一下,但一直都搞不定

    • 曲淡歌

      2021 年 3 月 31 日

      1.拉取镜像
      2.按照上面的代码 docker run..hvo
      大概步骤是这样的,过程我都有记录,有具体的问题你可以写在评论区,群晖的图形界面操作我就不清楚了,建议用命令行

Loading...
载入中

已到底部

没有可加载的页面

C
写微博
S
搜索
J
下一篇微博/评论
K
上一篇微博/评论
R
回复
E
编辑
O
显示隐藏评论
T
回顶部
L
登录
H
显示隐藏帮助
Ctrl+Enter
提交发布
ESC
取消并清除内容