Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

running ./build.sh results in bash complaining about invalid option #1

Closed
Soukyuu opened this issue Aug 21, 2014 · 5 comments
Closed

Comments

@Soukyuu
Copy link

Soukyuu commented Aug 21, 2014

Following the directions on the main page,

cd android-ffmpeg-with-rtmp
./build.sh

gives this:

/bin/bash: - : invalid option
Usage:  /bin/bash [GNU long option] [option] ...
    /bin/bash [GNU long option] [option] script-file ...
GNU long options:
    --debug
    --debugger
    --dump-po-strings
    --dump-strings
    --help
    --init-file
    --login
    --noediting
    --noprofile
    --norc
    --posix
    --rcfile
    --restricted
    --verbose
    --version
Shell options:
    -ilrsD or -c command or -O shopt_option         (invocation only)
    -abefhkmnptuvxBCHP or -o option

I also tried running it with sh build.sh, but then it goes

build.sh: line 4: source: _build_openssl.sh: file not found

It might be something obvious, but I'm rather new to linux.

@jeffreywescott
Copy link
Contributor

@Soukyuu, what version of bash are you running? It sounds like it doesn't understand the -O extglob option. Try this:

bash --version

Reply with your version number. Then try this to see if you get an error:

bash -O extglob

@Soukyuu
Copy link
Author

Soukyuu commented Aug 21, 2014

bash is

GNU bash, version 4.3.18(1)-release (x86_64-unknown-linux-gnu)

and

bash -O extglob

does not throw an error (doesn't display anything). I tried updating it to 4.3.22 and nothing changed.
I'm on arch linux x86_64 if it matters.

@jeffreywescott
Copy link
Contributor

That's odd, @Soukyuu -- I was able to reproduce the error on Ubuntu.

I changed build.sh -- see if the new version works for you.

@Soukyuu
Copy link
Author

Soukyuu commented Aug 21, 2014

it is running now, @jeffreywescott, thanks!

@eespejelc
Copy link

Hi. We are trying to run a script to restart all weblogic instances on rhel 7 but the log show next error:

/etc/init.d/cognos restartall > /opt/cognos/cron_restart.log 2>&1

LOG FILE:
: invalid option
Usage: /bin/bash [GNU long option] [option] ...
/bin/bash [GNU long option] [option] script-file ...
GNU long options:
--debug
--debugger
--dump-po-strings
--dump-strings
--help
--init-file
--login
--noediting
--noprofile
--norc
--posix
--protected
--rcfile
--rpm-requires
--restricted
--verbose
--version
Shell options:
-irsD or -c command or -O shopt_option (invocation only)
-abefhkmnptuvxBCHP or -o option

How can I fix it? i have:
bash --version
GNU bash, version 4.2.46(2)-release (x86_64-redhat-linux-gnu)

uname -r

3.10.0-693.21.1.el7.x86_64

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants