0

When installing Thrift to access my hbase using different languages,

during the configuration when i am running

[hadoop@localhost thrift]$  ./bootstrap.sh

I get:

-bash: ./bootstrap.sh: /bin/sh^M: bad interpreter: No such file or directory

How to solve this issue ?

Community
  • 1
  • 1
s.s
  • 93
  • 2
  • 14

2 Answers2

0

From reported error, it look like bootstrap.sh has some control characters (note ^M in error). May be bootstrap.sh need to be explicitly converted into unix format, you may use dos2unix command for this.

dos2unix ./bootstrap.sh
Shubhangi
  • 2,229
  • 2
  • 14
  • 14
0

Looks as if the #! hashbang line of that file is corrupt.

Before using tools like dos2unix I'd rather check why that ^M is there at all. That should not be the case, and it is very likely that the file has more defects.

If in doubt, try restoring bootstrap.sh from the original source.

JensG
  • 13,148
  • 4
  • 45
  • 55