Question

First steps in FreeBSD: trying to run my installation script. Fast help needed:

# ls
configure
# file configure
configure: Bourne-Again shell script text executable
# ./configure
./configure: Command not found
# configure
configure: Command not found

What is wrong, how can I execute this script?

Was it helpful?

Solution

Do you have bash installed? If not use FreeBSD Ports to install it. Use where bash to find out.

OTHER TIPS

Use the force Luke :)

# pkg_add -r bash

May it be, that your's configure script doesn't have appropriate executions rights. Try to cast:

chmod 777 configure

If it works, fix it to

chmod 764 configure

configure scripts are ultra portable shell scripts. There is no need for bash here. The problem is somewhere else.

What's the first line in the configure script? Maybe a CR/LF snuck in, which is a common cause for a totally misleading error message saying that the script was not found, when it was the interpreter that was not found.

Please try /bin/sh ./configure

First line of this script (#!/usr/bin/bash, i suppose) should be changed to #!/usr/local/bin/bash. And of course, you should have shells/bash port installed.

Install the bash package using

pkg add bash

or

make -C /usr/ports/shells/bash install clean

By default FreeBSD comes with tcsh and a POSIX compatible FreeBSD sh

On older FreeBSD systems you will need to do

rehash

before you can run it.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top