Configure Syntax Error Unexpected
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about syntax error: "(" unexpected bash Stack Overflow the company Business Learn more about hiring developers or posting ads with us
Syntax Error At Line 1 (' Unexpected In Shell Script
Unix & Linux Questions Tags Users Badges Unanswered Ask Question _ Unix & Linux Stack Exchange is a question and answer
Syntax Error ( Unexpected Bash Array
site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute: Sign up Here's how it works: Anybody can ask a question Anybody can answer The best answers are
Syntax Error ( Unexpected Ubuntu
voted up and rise to the top Shell script fails: Syntax error: “(” unexpected up vote 31 down vote favorite 7 I've been working on a script that automates setting up a development environment for Raspberry Pi development (step by step details that work are here). The script is linked in that article but convenience you can find it here also. Now when run this script install and sets up the environment without syntax error at line unexpected error but you have to enter your sudo password more than once due to sudo's time-out value by default. So I started experimenting by removing all the sudo lines and running the whole script via sudo at the command line like so: kemra102@ubuntuvm:~$ sudo ./pi_dev_env_install.sh This works fine as expected and gets most of the way through until this point: ./pi_dev_env_install: 68: ./pi_dev_env_install.sh: Syntax error: "(" unexpected Now this line worked fine previously when not running the whole script with sudo. There is nothing about this line running as sudo that should stop it working to my knowledge, does anyone have any ideas? bash shell ubuntu shell-script share|improve this question edited Aug 18 '12 at 12:08 Gilles 369k666681119 asked Aug 18 '12 at 11:37 kemra102 4681613 The shebang is really in line 9? Due to Ubuntu's DashAsBinSh affinity I suspect your script is interpreted by dash instead of bash. Try to move the shebang in line 1. –manatwork Aug 18 '12 at 11:45 According to that article calling /bin/bash directly instead of /bin/sh will; correctly use bash instead of dash so that should not be an issue as I understand it. I can still move the shebang of course, but that doesn't really explain as to why it works when y
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow ksh syntax error unexpected the company Business Learn more about hiring developers or posting ads with us Stack Overflow line 1: syntax error: unexpected word (expecting ")") Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 syntax error word unexpected (expecting ) ) shell script million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up While installing cint interpreter, running ./configure returns a syntax error up vote 4 down vote favorite I'm trying to http://unix.stackexchange.com/questions/45781/shell-script-fails-syntax-error-unexpected install the cint interpreter using the instructions provided on their website (instructions are also included below, as reference). When running the ./configure command, I get the following error: ~/cint-5.16.19$ ./configure ./configure: 23: ./configure: Syntax error: "(" unexpected It seems odd seeing as how I didn't include any parentheses to begin with... Any suggestions? (Am using bash shell in Xubuntu 14.) Instructions from cint: $ tar xfz cint-5.16.19-source.tar.gz <--this step worked $ cd http://stackoverflow.com/questions/26514959/while-installing-cint-interpreter-running-configure-returns-a-syntax-error cint-5.16.19 <--this step worked $ ./configure <--this step not working $ gmake Edit: Including some more info. The relevant line in configure (i.e., line 23 as referenced by the error message above) is as follows: ARCHS=(linux linuxicc macgcc djgpp cygwin mingw mwerks hpux aix msvc7 msvc8 solaris solarisgcc) Regarding shell compatibility, the following was included at the beginning of the configure file: # This is a bash script, which works with any reasonable sh. # Solaris sh is not, so we have to start bash, and call ourselves again. [ "x$1" != "x__have_the_proper_shell@" ] && ( \ uname -a | grep -i sunos > /dev/null \ && (bash $0 __have_the_proper_shell@ "$*") \ || (sh $0 __have_the_proper_shell@ "$*") \ ) [ "x$1" != "x__have_the_proper_shell@" ] && exit shift c linux interpreter share|improve this question edited Oct 22 '14 at 19:23 asked Oct 22 '14 at 18:53 iceman 754411 Could be you are using the wrong shell. Try changing the #!shebang in the configure script. And: what is on line#23 of the configure script? –wildplasser Oct 22 '14 at 19:01 Lines #23 and #34 just look wrong to me, even with a shebang. Maybe you should chack another version. –wildplasser Oct 22 '14 at 19:35 @iceman Were you ever able to resolve
Support Search GitHub This repository Watch 25 Star 152 Fork 13 bitlbee/bitlbee-facebook Code Issues 21 Pull requests 1 Projects 0 Pulse Graphs New issue ./configure: 12102: Syntax error: https://github.com/bitlbee/bitlbee-facebook/issues/49 word unexpected (expecting ")") #49 Closed niklaas opened this Issue Oct 23, 2015 · 4 comments Projects None yet Labels question resolved Milestone No milestone Assignees No one assigned 3 participants niklaas commented https://lists.andrew.cmu.edu/pipermail/openslide-users/2011-November/000227.html Oct 23, 2015 I get the following error during compilation on a FreeBSD system: $ ./autogen.sh -----------8<---------------- checking whether the cc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly syntax error linked in... no checking dynamic linker characteristics... freebsd10.1 ld.so checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking whether make supports nested variables... (cached) yes checking for cc option to accept ISO C99... none needed ./configure: 12102: syntax error unexpected Syntax error: word unexpected (expecting ")") BitlBee member dequis commented Oct 23, 2015 Works for me in freebsd 10.1. Do you have all the dependencies installed? (autoconf, automake, libtool, bitlbee, glib, json-glib, zlib). Do you use a weird /bin/sh? Maybe try running "bash ./configure" niklaas commented Oct 24, 2015 Everything is there: $ find / -name 'zlib' 2&>/dev/null /basejail/usr/src/sys/modules/zlib $ pkg info autoconf automake glib json-glib libtool bitlbee autoconf-2.69 automake-1.15_1 glib-2.44.1_2 json-glib-1.0.4 libtool-2.4.6 bitlbee-3.4.1_4 Normally, I use zsh but using bash gives the same error. $ bash ./autogen.sh --------8<-------- checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking whether make supports nested variables... (cached) yes checking for cc option to accept ISO C99... none needed ./configure: 12102: Syntax error: word unexpected (expecting ")") $ cat -n configure | sed -n '12095,12115p' 12095 # Check whether --with-plugindir was given. 12096 if test "${with_plugindir+set}" = set; then : 12097 withval=$with_plugindir; plugindir="$with_plugindir" 12098 12099 fi 12100 12101 12102 PKG_CHECK_MODULES(BITLBEE, bitlbee >= 3.4) 12103 PKG_CHECK_MODULES(GLIB, glib-2.0 >= 2.32.0 gobject-2.0) 12104 PKG_CHECK_MODULES(JSON, json-glib-1.0 >= 0.14.0) 12105 PKG_CHECK_MODULES(ZLIB, zlib) 12106 12107 12108 if test -z "$GLIB_GENMARSHAL"; then : 121
line 2039: syntax error near unexpected token `foreign' Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] On 11/07/2011 11:34 AM, Mathieu Malaterre wrote: > I am trying to compile openslide directly from github. According to > README one need run ./configure. Since this file is not shipped, I ran > autoconf first. But now I am getting the following error: > > ./configure: line 2039: syntax error near unexpected token `foreign' > ./configure: line 2039: `AM_INIT_AUTOMAKE(foreign subdir-objects > 1.11.1 dist-xz)' Hello Mathieu, It sounds as though you may have run the "autoconf" command rather than "autoreconf -i", which is the standard way of setting up Autotools in a checked-out source tree. You should be able to fix this by first ensuring you have automake and libtool installed on your system, then running "autoreconf -fi" inside the source tree. --Benjamin Gilbert Previous message: ./configure: line 2039: syntax error near unexpected token `foreign' Next message: ./configure: line 2039: syntax error near unexpected token `foreign' Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] More information about the openslide-users mailing list