公式の方法でインストールすると、apt update
でエラーが出るので、調べてみた。
wget https://mega.nz/linux/repo/xUbuntu_24.04/amd64/megasync-xUbuntu_24.04_amd64.deb &&\
sudo apt install "$PWD/megasync-xUbuntu_24.04_amd64.deb"
/etc/apt/sources.list.d/megasync.list
をみるとxUbuntu_${RELEASE}
の部分でリリースバージョンが15になっていて、リポジトリには存在しない。
ので、任意のバージョンに変更する。
RELEASE=$(lsb_release -rs) && \
echo "deb [signed-by=/usr/share/keyrings/meganz-archive-keyring.gpg] https://mega.nz/linux/repo/xUbuntu_${RELEASE}/ ./" \
| tee /etc/apt/sources.list.d/megasync.list
おわり。
追記:
インストールスクリプトはこんなかんじ。
apt-get update && apt-get install -y lsb-release curl gnupg &&\
RELEASE=$(lsb_release -rs) &&\
echo "deb [signed-by=/usr/share/keyrings/meganz-archive-keyring.gpg] https://mega.nz/linux/repo/xUbuntu_${RELEASE}/ ./" | tee /etc/apt/sources.list.d/megasync.list &&\
curl -sLf --retry 3 --tlsv1.2 --proto "=https" "https://mega.nz/linux/repo/xUbuntu_${RELEASE}/Release.key" | gpg --dearmor -o /usr/share/keyrings/meganz-archive-keyring.gpg &&\
apt-get update && apt install -y megacmd