Ubuntu – “Couldn’t find any package by regex ‘libmwsgl.so’ ”


While installing libmwsgl shared libraries in Ubuntu 14.04 getting error

Couldn't find any package by regex 'libmwsgl.so'

Trying to open graphs in Tracegraph202 for that I need to install this library.

Best Answer

libmwsgl is not in the Ubuntu or Debian repositories, nor can I find any other useful information relating to it aside from this tutorial on installing tracegraph.

This tutorial, while 5 years old, seems to be fairly comprehensive and the comments on it seem to indicate its helpfulness.

I'll summarise it here, but please make sure to read the thing in full.

  1. First, install this Tracegraph2.02 and this mgl (both mediafire; not dead/spam links because I checked.)

  2. Open a terminal and cd to the directory where the files downloaded: cd ~/Downloads, perhaps.

    • if you prefer not to use the terminal, just browse to the download directory in nautilus (file manager).
  3. from a terminal, run:

    tar zxvf tracegraph202linux.tar.gz  # gunzip and tar xvf in one command
    gunzip mglinstaller.gz              # gunzip will destroy the original archive
    mv mglinstaller tracegraph202/mglinstaller

    in the last command, make sure to replace tracegraph202/mglinstaller with <wherever tracegraph extracted>/mglinstaller.

    • from file manager, just right-click on each archive and select "Extract Here," then drag mglinstaller into tracegraph's folder.
  4. from a terminal, cd into tracegraph202 and give mglinstaller executable permissions and run it:

    chmod +x mlginstaller; ./mglinstaller
    • from file manager, you may be able to just double-click on mglinstaller: if you're prompted about whether you want to run it, just click Run in Terminal or similar. If double-clicking is unsuccessful, open the mglinstaller's properties by right-clicking -> "Properties" and selecting the "Permissions" tab at the top, then ensuring the Executable? box is fully checked for your user.
  5. When it runs, press enter at the prompt. There should now be a folder called bin/glnx86 in the same directory, i.e. tracegraph202/bin/glnx86. Copy everything else from tracegraph202 into tracegraph/bin/glnx86 using rsync (the safest way to exclude from a copy):

    rsync -av --progress --exclude="bin" . /bin/glnx86
    • from file manager, just copy/paste everything except bin into bin/glnx86.
  6. Now, run export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$HOME/tracegraph202/bin/glnx86" (the pathname represents the full absolute path to bin/glnx86).

  7. Close the terminal window, then open a new one. If the following is unsuccessful, try logging out and back in, then retrying it:

  8. cd to wherever tracegraph202/bin/glnx86 is, then give trgraph executable permissions and run it (same as above; this can be done from file manager in the same way as above too):

    chmod +x ./trgraph; ./trgraph

For the future, you can either sudo cp ~/whatever/tracegraph202/bin/glnx /usr/local/bin, so you can just type trgraph to run it, or add an alias or custom path to your .bashrc.

In the tutorial I'm referencing (linked above), there's a note that if your machine / Linux installation is x86_64 (64-bit), you may need to install some 32-bit libraries for it to work. However, these libraries (ia32-libs) are no longer available (as one will discover from a bit of googling), and are not installable or relevant.

The only way around this, as far as I know, is to try to build the relevant 32-bit libraries from source. If this issue affects you, let me know and I can try to help.