Hi, is there any way to install MEGAsync? should i install the package builder? which? YPKG or RPM, Thanks

    For a native package, the short answer is no (licence issues, the native client cannot be......manipulated or repackaged in any way). There should be a flatpak of it, but since there's no mention of it on the official Mega page and given the funny licence it should be considered completely unofficial and unsupported as well.

    5 days later

    enzo66

    🌏 Compiling Megasync

    I've been using megasync for quite a while with no problems, it's a bit complicated to get running, here is a brief note of my experinece in case it might by useful to you or others.

    The following are packages are needed before compiling megasync:

    sudo eopkg it system.devel linux-current-headers openssl-devel cryptopp-devel qt5-x11extras-devel bzip2-devel libsodium-devel c-ares-devel libmediainfo-devel qt5-base-devel qt5-tools-devel libglu-devel libraw-devel qt5-svg-devel sqlite3-devel libx11-devel git

    Steps before compiling

    cd
    git clone https://github.com/meganz/MEGAsync.git
    cd ~/MEGAsync
    git submodule update --init --recursive

    Then this line needs to be added to added to:
    ~/MEGAsync/src/MEGASync/mega/contrib/build_sdk.sh
    in the cloned MEGAsync folder:

    export CFLAGS="${CFLAGS/-D_FORTIFY_SOURCE=2}"

    (around line 664) so that when edited the surrounding lines look like this:

    package_extract $name $cares_file $cares_dir
    export CFLAGS="${CFLAGS/-D_FORTIFY_SOURCE=2}"
    package_configure $name $cares_dir $install_dir "$cares_params"
    package_build $name $cares_dir
    package_install $name $cares_dir $install_dir

    Compiling

    cd ~/MEGAsync/src
    ./configure
    qmake MEGA.pro
    lrelease MEGASync/MEGASync.pro
    make

    It takes a long time, if the compilation is successful you'll find the megasync binary here:

    ~/MEGAsync/src/MEGASync/megasync

    Copy it to /usr/bin/ and ensure the executable bit is set.

    If all is well, you can now add it to autostart from Budgie Settings (~/.config/autostart/).

      johano I was surprised to see that they also mention Solus in the end of README.md:

      Known Issues

      For Solus, c-ares might not compile do to a CFLAG defined by gcc: -D_FORTIFY_SOURCE=2. This issue and its possible solution is described here https://github.com/c-ares/c-ares/issues/58.

      If someone find this hard to compile, they can try to install from flathub.
      https://flathub.org/apps/details/nz.mega.MEGAsync

        algent Yes me too, that note re Solus has been there for a long time :-)

        Thanks for the flatpak link

        2 years later

        johano This was really helpful. Though while running ./configure I found the following error "unicode/uchar.h not found or unusable" I dont know enough about this to find an optimal fix, but what worked for me is installing libicu-devel by running sudo eopkg install libicu-devel.

          SilverZef

          Thanks for that information

          I'll leave this here in case it's useful to you or someone else,

          I've found the method outlined below less troublesome than compiling from source:

          Extracting the megasync executable straight from the .deb installation package. It's available at Megasync. At the minute I'm using version: 4.9.5 (extracted from the Debian 11 package) and found it perfectly stable and workable.

          Roughly this is how I managed:

          1. Open the Debian package in an archive manager
          2. Extract the megasync executable from data.tar.xz
          3. Place it in your local bin folder or /usr/bin
          4. Attempt first run from the terminal to flag up potential problems

          From my notes, I came across these two issues:

          2023-01-08: Had to copy /opt/mega/lib/libfreeimage.so.3 from the archive to /usr/lib64/libfreeimage.so.3 to get things to work. An error was thrown in the terminal regarding libfreeimage

          2023-07-17 sudo ln libicuuc.so.72.1 libicuuc.so.67 as it erred with megasync: error while loading shared libraries: libicuuc.so.67: cannot open shared object file: No such file or directory (Same issue as @SilverZef mentions)

          Later added megasync to ~/.config/autostart folder, with a .desktop file with the following contents, looks like I probably extracted that from the .deb archive also.

          #!/usr/bin/env xdg-open
          [Desktop Entry]
          Type=Application
          Version=1.0
          GenericName=File Synchronizer
          Name=MEGAsync
          Comment=Easy automated syncing between your computers and your MEGA cloud drive.
          TryExec=megasync
          Exec=megasync
          Icon=<PATH-TO-YOUR-PREFERRED-ICON>
          Terminal=false
          Categories=Network;System;
          StartupNotify=false

            johano

            Have you tried it on Wayland, by chance ? Because the flatpak (which runs perfectly fine on X11 Plasma) refuses to run on Plasma Wayland, if the .deb works I can get rid of the flatpak and use that at least.

              Hi CorvusRuber, I haven't tried it with Wayland, I'm using Budgie with X11. I did try the flatpak some time back, but it didn't satisfy me, I can't remember why ¯_(ツ)_/¯
              I don't have experience using Wayland yet, but can't see a reason why it shouldn't work. Let us know here if you try it, as it looks like we'll all be using Wayland before too long.

              Tried on Plasma Wayland and it works, so the problem is clearly the flatpak.