0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

megacmdインストール後にapt updateするとエラーが出るのを直す。

Posted at

公式の方法でインストールすると、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

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?