If your build fails for some reason, most probably there are unresolved build dependencies. Please have in mind that the build dependencies can vary a lot depending on the Linux OS that you use and the software that you have already installed. If you still have troubles, you should be able to identify the failing script from the console output. You may find it useful to enable "debug" logging in the failing shell script like this:
set -ex
. Manually run the failing script and identify the failing part. If you are unable to find a solution to your problem, then you can ask someone more experienced Linux guy around you or as alternative you can
submit an issue.