2020-05-16

Raspberry Pi 4 model B 安裝 Ubuntu 64-bit

Raspberry Pi 4 model B 安裝 Ubuntu 64-bit

Raspberry Pi 4 B 的 CPU 為 ARMv7l,是 32-bit 的 CPU,一般只會安裝 32-bit 的 OS。

但有些軟體已經不再支援 32-bit 的環境,此時使用 64-bit 變成一個基本需求。可喜的是 Ubuntu 官方已經提供 64-bit for Raspberry Pi 的 OS,不需要再到網路上找複雜的處理方式。

先到 Ubuntu 官網 下載 for Raspberry Pi 的 image 檔,現在可以選 Ubuntu 20.04 64-bit 的版本。雖然 R-Pi 官方的 Imager 裡已經有提供 Ubuntu 64-bit 的選項,但是還是建議先下載再使用 Imager,因為下載速度真的很慢。

接著再依照 How to install Ubuntu on your Raspberry Pi 安裝即可。

我個人是直接接實體網路線,所以 wifi 的設定都省了。

查看目前系統中可以安裝的 nodejs 和 mongodb 版本:

ubuntu@ubuntu:~$ apt-cache policy nodejs nodejs: Installed: (none) Candidate: 10.19.0~dfsg-3ubuntu1 Version table: 10.19.0~dfsg-3ubuntu1 500 500 http://ports.ubuntu.com/ubuntu-ports focal/universe arm64 Packages ubuntu@ubuntu:~$ apt-cache policy mongodb mongodb: Installed: (none) Candidate: 1:3.6.9+really3.6.8+90~g8e540c0b6d-0ubuntu5 Version table: 1:3.6.9+really3.6.8+90~g8e540c0b6d-0ubuntu5 500 500 http://ports.ubuntu.com/ubuntu-ports focal/universe arm64 Packages

如果沒有要太新的功能 nodejs 10 是可以接受的,安裝 nodejs 和 npm:

sudo apt install nodejs sudo apt install npm

也可以直接裝 MongoDB 3.6。若要安裝 MongoDB 4.2 可以參考這篇 Install Node.js and Npm on Raspberry Pi

沒有留言:

FB 留言