thrift安装./bootstrap配置错误

polhcujo  于 2021-05-29  发布在  Hadoop
关注(0)|答案(2)|浏览(405)

安装thrift以使用不同语言访问我的hbase时,
在我运行的配置过程中

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

我得到:

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

如何解决这个问题?

n1bvdmb6

n1bvdmb61#

从报告的错误来看,bootstrap.sh似乎有一些控制字符(注意错误中的^m)。可能是bootstrap.sh需要显式转换为unix,您可以为此使用dos2unix命令。

dos2unix ./bootstrap.sh
41ik7eoe

41ik7eoe2#

看起来好像 #! 该文件的hashbang行已损坏。
在使用诸如 dos2unix 我想看看为什么会这样 ^M 根本就没有。不应该是这样,而且文件很可能有更多的缺陷。
如果有疑问,请尝试恢复 bootstrap.sh 从原始来源。

相关问题