Ubuntu – How Do I Link to /usr/lib or /opt From /usr/bin

symbolic-link

This is Ubuntu 18.04 Desktop edition, running the default Gnome desktop.

I am trying to install FreeFileSync which is a downloadable .tar.gz file (from here: https://freefilesync.org/download.php). Once unpacked the tarball contains a directory, which in turn contains the binaries, sample .desktop files and another directory with resources like icons and sounds etc.

My initial approach was to copy the FreeFileSync directory to /usr/lib, and then link to it from /usr/bin:

sudo ln -s /usr/lib/FreeFileSync/FreeFileSync /usr/bin/freefilesync

… and then edit the .desktop file setting Exec=/usr/bin/freefilesync, and copy it to /usr/share/applications/FreeFileSync.desktop

The result is rather strange and I can't figure it out.

  • If I run FreeFileSync from the applications menu it starts as expected
  • If I open a terminal at /usr/bin and type "freefilesync" it starts as expected
  • But if I run "freefilesync" in a terminal from anywhere other than /usr/bin I get this response: "Cannot determine real path for "freefilesync": No such file or directory [realpath]"

I have also tried putting the FreeFileSync directory in /opt but the same thing happens. I have other apps installed like Zoom and Citrix Receiver which both use symlinks to binary files from /usr/bin to /opt, which work perfectly, and the links look identical to the one I created above.

Any help with this is much appreciated as I'm scratching my head about what's going on here.

Best Answer

After this forum. This is an application bug.

It works fine if I symlink directly to .../FreeFileSync/Bin/FreeFileSync_x86_64

sudo ln -s /opt/FreeFileSync/Bin/FreeFileSync_x86_64 /usr/bin/FreeFileSync 

Workarounds: How-To install freefilesync on Kubuntu 18.04

Related Question