我正在尝试使用cygwin在windows机器上配置hadoop2.5.1。但每当我试图执行命令hdfs namenode-格式出现以下错误错误:找不到或加载主类org.apache.hadoop.hdfs.server.namenode.namenode我把 java 之家设置为h:\cygwin\usr\local\java地址在bashrc和hadoop-env.sh中。有谁能帮我,我在哪一部分可能会出错???
ha5z0ras1#
hy,我有同样的问题,但是我解决了其他问题,在使用cygwin的windows上,你必须:确保在不包含空格的文件夹中安装javajdk使路径更靠近根 C:\ 用cygwin c:\翻译成 /cygdrive/c/ 请注意,(斜杠)必须是linux样式/而不是microsoft样式\(反斜杠)编辑位于c:\cygwin\home\username.bashrc的.bashrc文件导出java\u home=/cygdrive/c/program\u files/java/jdk1.7.0\u 71导出路径=$path:$java\u home/bin导出m2\u home=/cygdrive/c/maven导出路径=$path:$m2\u home/bin导出平台=x64export hadoop\u home=/cygdrive/c/cygwin/usr/local/hadoop导出hadoop\u install=/cygdrive/c/cygwin/usr/local/hadoop导出路径=$path:$hadoop\u install/binexport path=$path:$hadoop\u安装/sbinexport hadoop\u mapred\u home=$hadoop\u installexport hadoop\u common\u home=$hadoop\u installexport hadoop\u hdfs\u home=$hadoop\u installexport yarn\u home=$hadoop\u安装导出hadoop\u config\u directory=/cygdrive/c/hadoop/etc/hadoop祝你好运!
C:\
/cygdrive/c/
1条答案
按热度按时间ha5z0ras1#
hy,我有同样的问题,但是我解决了其他问题,在使用cygwin的windows上,你必须:
确保在不包含空格的文件夹中安装javajdk
使路径更靠近根
C:\
用cygwin c:\翻译成/cygdrive/c/
请注意,(斜杠)必须是linux样式/而不是microsoft样式\(反斜杠)编辑位于c:\cygwin\home\username.bashrc的.bashrc文件
导出java\u home=/cygdrive/c/program\u files/java/jdk1.7.0\u 71
导出路径=$path:$java\u home/bin
导出m2\u home=/cygdrive/c/maven
导出路径=$path:$m2\u home/bin
导出平台=x64
export hadoop\u home=/cygdrive/c/cygwin/usr/local/hadoop
导出hadoop\u install=/cygdrive/c/cygwin/usr/local/hadoop
导出路径=$path:$hadoop\u install/bin
export path=$path:$hadoop\u安装/sbin
export hadoop\u mapred\u home=$hadoop\u install
export hadoop\u common\u home=$hadoop\u install
export hadoop\u hdfs\u home=$hadoop\u install
export yarn\u home=$hadoop\u安装
导出hadoop\u config\u directory=/cygdrive/c/hadoop/etc/hadoop
祝你好运!