fxy8glb 发表于 2015-8-24 09:40:42

hadoop源码编译问题--菜鸟

ant编译hadoop-1.0.0,报错
刚开始接触hdoop,碰到的问题真不少。

1、环境:苹果mac上跑的虚拟机,虚拟机安装win7,win7上跑的cygdrive。

2、报错信息如下:
BUILD FAILED
C:\hadoop\build.xml:2385: impossible to resolve dependencies:
      java.io.FileNotFoundException: \\vmware-host\Shared Folders\.ivy2\cache\resolved-org.apache.hadoop-Hadoop-working@WIN-CH0ELM7ACUD.xml (系统找不到指定的路径)

3、具体编译细节如下:

Jack@WIN-CH0ELM7ACUD /cygdrive/c/hadoop
$ ant
Buildfile: C:\hadoop\build.xml

clover.setup:

clover.info:
   
         Clover not found. Code coverage reports disabled.
   

clover:

ivy-download:
   
         Display ivy-download.
   
       Getting: http://repo2.maven.org/maven2/org/apache/ivy/ivy/2.1.0/ivy-2.1.0.jar
       To: C:\hadoop\ivy\ivy-2.1.0.jar
       Not modified - so not downloaded

ivy-init-dirs:

ivy-probe-antlib:

ivy-init-antlib:

ivy-init:
:: Ivy 2.1.0 - 20090925235825 :: http://ant.apache.org/ivy/ ::
:: loading settings :: file = C:\hadoop\ivy\ivysettings.xml

ivy-resolve-common:
   
         Display ivy-resolve-common.
   
:: resolving dependencies :: org.apache.hadoop#Hadoop;working@WIN-CH0ELM7ACUD
   confs:

BUILD FAILED
C:\hadoop\build.xml:2385: impossible to resolve dependencies:
      java.io.FileNotFoundException: \\vmware-host\Shared Folders\.ivy2\cache\resolved-org.apache.hadoop-Hadoop-working@WIN-CH0ELM7ACUD.xml (系统找不到指定的路径)
      at java.io.FileOutputStream.open(Native Method)
      at java.io.FileOutputStream.<init>(FileOutputStream.java:179)
      at java.io.FileOutputStream.<init>(FileOutputStream.java:131)
      at org.apache.ivy.plugins.parser.xml.XmlModuleDescriptorUpdater.update(XmlModuleDescriptorUpdater.java:130)
      at org.apache.ivy.plugins.parser.xml.XmlModuleDescriptorParser.toIvyFile(XmlModuleDescriptorParser.java:143)
      at org.apache.ivy.core.module.descriptor.DefaultModuleDescriptor.toIvyFile(DefaultModuleDescriptor.java:527)
      at org.apache.ivy.core.resolve.ResolveEngine.resolve(ResolveEngine.java:246)
      at org.apache.ivy.core.resolve.ResolveEngine.resolve(ResolveEngine.java:193)
      at org.apache.ivy.Ivy.resolve(Ivy.java:502)
      at org.apache.ivy.ant.IvyResolve.doExecute(IvyResolve.java:244)
      at org.apache.ivy.ant.IvyTask.execute(IvyTask.java:277)
      at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:293)
      at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
      at org.apache.tools.ant.Task.perform(Task.java:348)
      at org.apache.tools.ant.Target.execute(Target.java:435)
      at org.apache.tools.ant.Target.performTasks(Target.java:456)
      at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1405)
      at org.apache.tools.ant.Project.executeTarget(Project.java:1376)
      at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
      at org.apache.tools.ant.Project.executeTargets(Project.java:1260)
      at org.apache.tools.ant.Main.runBuild(Main.java:853)
      at org.apache.tools.ant.Main.startAnt(Main.java:235)
      at org.apache.tools.ant.launch.Launcher.run(Launcher.java:285)
      at org.apache.tools.ant.launch.Launcher.main(Launcher.java:112)

Total time: 1 minute 49 seconds

请各位hadoop高手指点迷津,谢谢!

jixianqiuxue 发表于 2015-8-24 14:11:33

C:\hadoop\build.xml:2385: impossible to resolve dependencies:
      java.io.FileNotFoundException: \\vmware-host\Shared Folders\.ivy2\cache\resolved-org.apache.hadoop-Hadoop-working@WIN-CH0ELM7ACUD.xml (系统找不到指定的路径)

到相应路径下看看

fxy8glb 发表于 2015-8-24 14:22:58

\\vmware-host\Shared Folders,是我的mac os的路径。不清楚为什么指到这个路径。
在哪里可以设置正确的路径。

jixianqiuxue 发表于 2015-8-24 15:11:20

fxy8glb 发表于 2015-8-24 14:22
\\vmware-host\Shared Folders,是我的mac os的路径。不清楚为什么指到这个路径。
在哪里可以设置正确的路 ...

C:\hadoop\build.xml这个文件中依赖指向的

fxy8glb 发表于 2015-8-24 15:53:58

谢谢楼主,具体是哪个参数?

Alkaloid0515 发表于 2015-8-24 21:43:12

fxy8glb 发表于 2015-8-24 15:53
谢谢楼主,具体是哪个参数?

贴出来看下

fxy8glb 发表于 2015-8-24 22:01:46

build.xml
......
<target name="ivy-init" depends="ivy-init-antlib" >

    <!--Configure Ivy by reading in the settings file
      If anyone has already read in a settings file into this settings ID, it gets priority
    -->
    <ivy:configure settingsid="${ant.project.name}.ivy.settings" file="${ivysettings.xml}" override='false'/>
</target>

<target name="ivy-resolve" depends="ivy-init">
    <ivy:resolve settingsRef="${ant.project.name}.ivy.settings"/>
</target>

<target name="ivy-resolve-javadoc" depends="ivy-init">
    <ivy:resolve settingsRef="${ant.project.name}.ivy.settings" conf="javadoc"/>
</target>

<target name="ivy-resolve-releaseaudit" depends="ivy-init">
    <ivy:resolve settingsRef="${ant.project.name}.ivy.settings" conf="releaseaudit"/>
</target>

<target name="ivy-resolve-test" depends="ivy-init">
    <ivy:resolve settingsRef="${ant.project.name}.ivy.settings" conf="test" />
</target>

<target name="ivy-resolve-common" depends="ivy-init">
    <echo>
       Display ivy-resolve-common.
    </echo>
       
    <ivy:resolve settingsRef="${ant.project.name}.ivy.settings" conf="common" />
</target>
......

fxy8glb 发表于 2015-9-4 09:20:25

hadoop-0.20.2,没有问题
页: [1]
查看完整版本: hadoop源码编译问题--菜鸟