家裡有一臺半閒置的 12 年的 Mac Mini，之前偶爾跑點 Docker 的東西，順便還有把一臺超舊的印表機共享到局域網裡。不過想想應該拿它做點別的事，比如裝個 Linux 然後搭上 v2ray 做軟路由實現透明代理，然後再裝個 Docker 偶爾測試自己寫的 Linux 的東西～
不過這一篇 post 並不是寫如何用 v2ray 在 Linux 上搭軟路由，而是想起現在的軟路由用的是 Raspberry Pi 4。Raspberry Pi 4 在實際使用的時候還是不錯的，但是發熱量比較大，以及 softirq 看起來略有點爆炸 233333
因為打算用 Raspberry Pi 4 做點別的專案，那麼軟路由透明代理的 workload 就交給 Mac Mini 好啦，再寫個程式手動控制一下 Mac Mini 的風扇轉速～這樣就不會因為 workload 比較大，然後晚上風扇轉速太高影響睡眠💤 白天的時候倒是基本無所謂。測試的時候發現 3000-3300 RPM 幾乎聽不到聲音，同時也比最低速 1800 RPM 高出一截，不太會因為過熱而出現問題～(╹ڡ╹)
When I was deploying my Raspberry Pi for my new project, dpkg reported a unrecoverable fatal error while installing dependencies,
dpkg: unrecoverable fatal error, aborting:
unknown system group 'ssl-cert' in statoverride file; the system group got removed
before the override, which is most probably a packaging bug, to recover you
can remove the override manually with dpkg-statoverride
E: Sub-process /usr/bin/dpkg returned an error code (2)
So I had a look at the file /var/lib/dpkg/statoverride
Since dpkg said that the system group ssl-cert was already removed, and to recover I need to remove these entries with ssl-cert.
Then it was time for sed, let's remove the lines containing ssl-cert
I didn't realize that Raspberry Pi 4 worked in 32-bit mode until I compiled MongoDB Embedded. Though Raspberry Pi 4 comes with a 64-bit CPU, it uses 32-bit kernel by default, let alone these userland programs.
Obviously, the compiled MongoDB Embedded was 32-bit too. But fortunately, it was not what I actually want, and after setup 64-bit environment for Raspberry Pi 4 in this post, I can compile a fully-functional MongoDB.
But wait, there seems to be an easier way to put Raspberry Pi 4 to 64-bit mode -- Install Manjaro. However, I don't quite like Arch.
There are basically three steps to get a Raspberry Pi worked in the 64-bit environment.
Recently, I'm planning a new tiny project which can run on a Raspberry Pi 4. Well, actually, it can run anywhere, but given that I already bought a Raspberry Pi 4, why not have some fun on that♪(´ε｀ )
After considerations, a NoSQL database will be used for this project. And I opt for MongoDB. Although there is a MongoDB on Raspbian repo, the version of that is too old -- it's MongoDB 2.4, whereas the newest version is 4.2.1.
Therefore, to ensure that there won't be too many changes because of the updates of MongoDB in the future, let's use the latest version of MongoDB~ And of course, there will be a long time to compile MongoDB on Raspberry Pi. ( ；´Д｀)
At the time of writing, the release version of Raspbian on my Raspberry Pi 4 is