Skip to content
Advertisement

possible missing library when running cmake

I am trying to install a program on my machine (running Linux), but I get the following error when I run make:

Starting build...
Working Directory : /home/laptop/mplabs_test
Build Type        : 

Generating OMP binary...
/bin/sh: 1: Syntax error: "&" unexpected
make: *** [lbs3d] Error 2

What is wrong, am I missing a library?

Advertisement

Answer

The problem is that the Makefile uses bash specific syntax (|&) but the commands are executed by /bin/sh, which does not point to /bin/bash.

On my computer (Ubuntu 14.04):

ls -l /bin/sh
lrwxrwxrwx 1 root root 4 Sep 16  2014 /bin/sh -> dash

A solution could be to let the symbolic link /bin/sh point to /bin/bash:

sudo rm /bin/sh
sudo ln -s /bin/bash /bin/sh
User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement