0

I am trying to run the binary found at this site http://shaddack.brutowave.com/projects/sw_qr2laser/ I set it to executable and try and run ...

laptop@XPS15:~/Downloads$ qr2laser
qr2laser: command not found
laptop@XPS15:~/Downloads$

or ...

  laptop@XPS15:~/Downloads$ ./qr2laser
  ./qr2laser: error while loading shared libraries: libMagickWand.so.5: 
  cannot open shared object file: No such file or directory
  laptop@XPS15:~/Downloads$

It requires imagemagick to run and this is installed.

I have also tried to compile the source code but I also have errors relating to imagemagick.

Is this a reference error? Should imagemagick bein a different path?

2 Answers2

0

The only currently supported version of Ubuntu where libmagickwand5 is available is 14.04 (supported until April 2019), so installing it is one possible solution.

fkraiem
  • 12,813
0

There are two ways here, you can either

  1. compile the software for your exact system from its source qr2laser.c or
  2. use the binary qr2laser as you tried.

The first one is what you should try first. Compiling on your system means the compiler will dig through your exact system to find the programs and libraries your software needs and create a binary. If there are missing dependencies, i.e. the compiler can't find programs your software needs, you will get a nice error message informing you what's wrong.
The second one has the downside that your system needs to have the same prerequisites as the system where the binary was compiled. In your case that's obviously not the case, and if you don't happen to use Ubuntu 14.04 it's hard (and not a good idea overall!) to install the missing libMagickWand.so.5 library.

Compile the software yourself (the way to go)

  1. Install the necessary compiler and your software's prerequisites:

    sudo apt install gcc libmagickwand-6.q16-2
    
  2. Download your software's source code:

    wget http://shaddack.brutowave.com/projects/sw_qr2laser/qr2laser.c
    
  3. Compile it:

    gcc -std=c99 -o qr2laser `pkg-config --cflags --libs MagickWand` qr2laser.c
    
  4. If everything went through without errors you will now have a qr2laser binary you can start:

    ./qr2laser
    

Use the precompiled binary (the last resort)

When it comes to old software a virtual machine is the way to go because you don't flood your working installation with hoary software.

  1. Install virtualbox:

    sudo apt install virtualbox
    sudo apt install virtualbox-ext-pack # optional, for e.g. USB 2.0 support 
    
  2. Set up a virtual machine and install a matching OS, Ubuntu 14.04 in this case.
  3. Inside the VM, install your software's prerequisites and run it:

    sudo apt install libmagickwand5
    /path/to/qr2laser
    
dessert
  • 40,956