Cannot compile boost 1.35 under ubuntu linux

Hello. I tried to configure boost in order to be able to install it. But the configure archive seems to be broken. bash: ./configure: /bin/sh^M: bad interpreter: No such file or directory The output shows a ^M symbol after /bin/sh. It seems to be an encoding problem. So I tried to delete that line and invoke the script with the shell explicitly: /bin/bash ./configure --prefix=/usr But I get this error: : command not found: : command not found: : command not found2: : command not found7: '/configure: line 29: syntax error near unexpected token `do '/configure: line 29: `do Any solution, please? Thanks in advance.

On Mon, Apr 7, 2008 at 5:33 PM, Germán Diago
Hello. I tried to configure boost in order to be able to install it. But the configure archive seems to be broken.
bash: ./configure: /bin/sh^M: bad interpreter: No such file or directory
The output shows a ^M symbol after /bin/sh. It seems to be an encoding problem. So I tried to delete that line and invoke the script with the shell explicitly:
/bin/bash ./configure --prefix=/usr
But I get this error:
: command not found: : command not found: : command not found2: : command not found7: '/configure: line 29: syntax error near unexpected token `do '/configure: line 29: `do
Any solution, please? Thanks in advance.
If the first line has \r\n problems, the rest of them likely do too. The strange error messages could well be the result of extra carriage returns, lending credence to that theory. Try converting all the line endings: dos2unix ./configure # should do it HTH, ~ Scott

On Monday 07 April 2008, Scott McMurray wrote:
On Mon, Apr 7, 2008 at 5:33 PM, Germán Diago
wrote: Hello. I tried to configure boost in order to be able to install it. But the configure archive seems to be broken.
bash: ./configure: /bin/sh^M: bad interpreter: No such file or directory
The output shows a ^M symbol after /bin/sh. It seems to be an encoding problem. So I tried to delete that line and invoke the script with the shell explicitly:
/bin/bash ./configure --prefix=/usr
But I get this error: : command not found: : command not found: : : command not found2: : command not found7:
'/configure: line 29: syntax error near unexpected token `do '/configure: line 29: `do
Any solution, please? Thanks in advance.
- make sure you download the tar file and not the zip file - change the first line of the script from #!/bin/sh to #!/bin/bash see if that helps. Lothar

Germán Diago wrote:
Hello. I tried to configure boost in order to be able to install it. But the configure archive seems to be broken.
bash: ./configure: /bin/sh^M: bad interpreter: No such file or directory
The output shows a ^M symbol after /bin/sh. It seems to be an encoding problem. So I tried to delete that line and invoke the script with the shell explicitly:
/bin/bash ./configure --prefix=/usr
Did you install from the .zip file? That has all the files in \r\n Windows format, while the .tar.gz version has all Unix line endings which is what you need. HTH, John.

The only problem was that I was downloading the .7z file. I downloaded the .tar.bz2 file and everything goes well. The problem was the encoding of the line end. Thank you all for your time.
participants (4)
-
Germán Diago
-
John Maddock
-
Lothar Werzinger
-
Scott McMurray