Re: Cross Compiling Python for ARM

Discussion in 'Python' started by Thomas Jollans, Sep 14, 2010.

  1. On Tuesday 14 September 2010, it occurred to Neil Benn to exclaim:
    > #
    > ./python
    >
    > -sh: ./python: not found



    I'm guessing either there is no file ./python, or /bin/sh is fundamentally
    broken.
    Thomas Jollans, Sep 14, 2010
    #1
    1. Advertising

  2. Thomas Jollans

    David Boddie Guest

    On Tuesday 14 September 2010 21:19, Thomas Jollans wrote:

    > On Tuesday 14 September 2010, it occurred to Neil Benn to exclaim:
    >> #
    >> ./python
    >>
    >> -sh: ./python: not found

    >
    >
    > I'm guessing either there is no file ./python, or /bin/sh is fundamentally
    > broken.


    Yes, it may be instructive to use the file command to see what ./python
    actually is:

    file ./python

    David
    David Boddie, Sep 14, 2010
    #2
    1. Advertising

  3. Thomas Jollans

    Hans Mulder Guest

    Thomas Jollans wrote:
    > On Tuesday 14 September 2010, it occurred to Neil Benn to exclaim:
    >> #
    >> ./python
    >>
    >> -sh: ./python: not found

    >
    >
    > I'm guessing either there is no file ./python, or /bin/sh is fundamentally
    > broken.


    ..... or ./python is a symlink to a file that does not exist, or ./python
    is a script and the shebang line points to an interpreter that does not
    exist.

    The most popular way to get the latter problem is to write the script
    on a Windows box and then upload it to Unix box using FTP in binary
    mode (or some other transport that doesn't adjust the line endings).

    Try the command "file ./python". If it reports something like:

    ./python: a /usr/bin/python\015 script text executable

    , then the \015 tells you that you need to use dos2unix.

    It may be the case that /bin/sh is fundamentally broken if it reports
    "./python: file not found" if the problem is really the shebang line.
    Unfortunately, some shells are fundamentally broken this way.


    Hope this helps,

    -- HansM
    Hans Mulder, Sep 15, 2010
    #3
  4. In message <4c911670$0$41115$4all.nl>, Hans Mulder wrote:

    > The most popular way to get the latter problem is to write the script
    > on a Windows box and then upload it to Unix box using FTP in binary
    > mode (or some other transport that doesn't adjust the line endings).


    I always thought it was a misfeature that the Linux kernel doesn’t recognize
    all the common conventions for ending the shebang line.

    All reading of text files should be similarly tolerant.
    Lawrence D'Oliveiro, Sep 19, 2010
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Steve Jasper
    Replies:
    0
    Views:
    2,989
    Steve Jasper
    Nov 20, 2003
  2. gregarican

    Cross-compiling Ruby for ARM?

    gregarican, Nov 7, 2005, in forum: Ruby
    Replies:
    0
    Views:
    185
    gregarican
    Nov 7, 2005
  3. Zach
    Replies:
    0
    Views:
    142
  4. Gilles

    Cross-compiling Python for ARM?

    Gilles, Apr 15, 2013, in forum: Python
    Replies:
    3
    Views:
    145
    Gilles
    Apr 20, 2013
  5. Saeed Amrollahi
    Replies:
    1
    Views:
    120
    Jorgen Grahn
    Jan 6, 2014
Loading...

Share This Page