Skip to main content

Megacmd

How to Install MEGAcmd on Gentoo Linux (from source)

How to Install MEGAcmd on Gentoo Linux (from source)

hahnavi hahnavi

MEGAcmd is MEGA’s official CLI, and on Gentoo it’s easiest to build from source. The MEGA SDK snapshot used here needs a small ffmpeg compile fix (the same patch used in the Arch AUR). The steps below pull the exact sources, apply the patch, then build and install.

Download sources and patch

curl -OL "https://github.com/meganz/MEGAcmd/archive/1.7.0_Linux.tar.gz"
curl -OL "https://github.com/meganz/sdk/archive/e448c09e73a4496329f46e538f1f20143b618ed1.tar.gz"
curl -OL "https://aur.archlinux.org/cgit/aur.git/plain/fix-ffmpeg-compile.patch?h=megacmd"

Extract

tar xf 1.7.0_Linux.tar.gz
tar xf e448c09e73a4496329f46e538f1f20143b618ed1.tar.gz

Prepare the tree

cd MEGAcmd-1.7.0_Linux

Replace the bundled SDK with the one we just downloaded: