Find the answer to your Linux question:
Results 1 to 7 of 7
Hi i am trying to run a script in my n810 that uses maemo which is pretty similar to debian the script works perfectly in scratchbox on my desktop then ...
  1. #1
    Just Joined!
    Join Date
    Oct 2008
    Posts
    23

    errors while executing a script

    Hi

    i am trying to run a script in my n810 that uses maemo which is pretty similar to debian
    the script works perfectly in scratchbox on my desktop
    then i copied all the executables under /usr/local/lib and /usr/local/bin to n810 and tried to run the same script but it gives very weird errors

    firstly it says #!/bin/bash: not found

    then i have a command
    /usr/local/bin/display img.jpg
    and it gives the error message
    /usr/local/bin/display: line 1: syntax error: "(" unexpected

    now where the hell is the bracket??

    i am really confused

    can any1 tell me how to solve this??

    thanks
    unnati

  2. #2
    Linux Engineer GNU-Fan's Avatar
    Join Date
    Mar 2008
    Posts
    935
    I would assume the bracket to be in the script "/usr/local/bin/display".
    Debian GNU/Linux -- You know you want it.

  3. #3
    Just Joined!
    Join Date
    Oct 2008
    Posts
    23
    yes
    i tried doing cat /usr/local/bin/display

    and there is a bracket on the first line but then all other characters are just garbage...am i supposed to delete that bracket...i am afraid i might mess up everything if i modify a binary file

  4. #4
    Linux Guru smolloy's Avatar
    Join Date
    Apr 2005
    Location
    CA, but from N.Ireland
    Posts
    2,413
    Don't edit compiled binaries by hand. You will kill them if you do that

    You say that you copied lots of executables from your desktop to your n810 -- are you sure these were compiled for the right architecture? Binaries compiled for one processor won't work on a different one.
    Registered Linux user #388328 || Registered LFS user #15880
    AMD 64 X2 4600+ :: 2X1GB DDR2 800 :: GeForce 9400 GT 512MB :: ASUS M2N32 Deluxe :: 4X250GB SATAII
    Need instant help? Try us on IRC -- #linuxforums on freenode

  5. #5
    Just Joined!
    Join Date
    Oct 2008
    Posts
    23
    i think they should be...i had set the scratchbox target to DIABLO_ARMEL..thats what the n810 uses!!

    i didn't get any error in scratchbox...the only huge problem is the 78mm long n810!!

  6. #6
    Linux Guru smolloy's Avatar
    Join Date
    Apr 2005
    Location
    CA, but from N.Ireland
    Posts
    2,413
    I don't know that much about scratchbox, but are you sure that it compiled all the executables in /usr/local to the right target?

    Also the error,
    Code:
    /usr/local/bin/display: line 1: syntax error: "(" unexpected
    makes it look like it's trying to run a binary executable as a script.....
    Last edited by smolloy; 11-20-2008 at 06:37 PM.
    Registered Linux user #388328 || Registered LFS user #15880
    AMD 64 X2 4600+ :: 2X1GB DDR2 800 :: GeForce 9400 GT 512MB :: ASUS M2N32 Deluxe :: 4X250GB SATAII
    Need instant help? Try us on IRC -- #linuxforums on freenode

  7. #7
    Just Joined!
    Join Date
    Oct 2008
    Posts
    23
    ok i got rid of the first error by installing bash on maemo

    now i get another error as
    /usr/local/bin/display: cannot execute a binary

    u were right smolloy...my program is trying to run binaries as scripts...any idea how to work around it??

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •