我正在阅读 Mahout in Action 并完成第 2 章中的第一个示例。
$ javac RecommenderIntro.java
RecommenderIntro.java:2: error: package org.apache.mahout.cf.taste.impl.model.file does not exist
import org.apache.mahout.cf.taste.impl.model.file.*;
^
RecommenderIntro.java:3: error: package org.apache.mahout.cf.taste.impl.neighborhood does not exist
import org.apache.mahout.cf.taste.impl.neighborhood.*;
^
RecommenderIntro.java:4: error: package org.apache.mahout.cf.taste.impl.recommender does not exist
import org.apache.mahout.cf.taste.impl.recommender.*;
我通过 yum 安装了 Mahout:
$ sudo yum install mahout
...
Downloading Packages:
mahout-0.7+12-1.cdh4.2.0.p0.9.el6.noarch.rpm | 94 MB 05:17
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Updating : mahout-0.7+12-1.cdh4.2.0.p0.9.el6.noarch 1/2
Cleanup : mahout-0.7+8-1.cdh4.1.2.p0.12.el6.noarch 2/2
Verifying : mahout-0.7+12-1.cdh4.2.0.p0.9.el6.noarch 1/2
Verifying : mahout-0.7+8-1.cdh4.1.2.p0.12.el6.noarch 2/2
Updated:
mahout.noarch 0:0.7+12-1.cdh4.2.0.p0.9.el6
Complete!
我对 Java 也完全陌生。
我编译不正确吗?
我是否需要在调用 javac 的命令行上指定一些包含路径?