【发布时间】:2013-02-08 22:28:40
【问题描述】:
我现在正在尝试 HOURS,但无法找出问题所在。 我是 clojure 的新手,并尝试制作一个简单的 flickr 客户端。 但是我对不同的库有这个问题......我想我犯了一个普遍的错误。
目前我尝试在这个库中使用 oauth:https://github.com/mattrepl/clj-oauth
lein new projectname
我的 project.clj 看起来像这样:
(defproject flickr "0.1.0-SNAPSHOT"
:description "FIXME: write description"
:url "http://example.com/FIXME"
:license {:name "Eclipse Public License"
:url "http://www.eclipse.org/legal/epl-v10.html"}
:dependencies [[org.clojure/clojure "1.4.0"]
[clj-oauth "1.4.0"]])
添加 clj-oauth2 后我运行:
lein deps
还有我的 core.clj:
(ns flickr.core)
(require ['oauth.client :as 'oauth])
(def consumer-key "0000")
(def consumer-secret "0000")
(def consumer (oauth.client/make-consumer <consumer-token>
<consumer-token-secret>
"http://www.flickr.com/services/oauth/request_token"
"http://www.flickr.com/services/oauth/access_token"
"http://www.flickr.com/services/oauth/authorize"
:hmac-sha1))
当我现在尝试运行它时:
lein run
我明白了:
FileNotFoundException Could not locate oauth/client__init.class or oauth/client.clj on classpath: clojure.lang.RT.load (RT.java:432)
有人知道问题出在哪里吗? 还从 github repo 下载了 oauth 源,构建它并将其添加到我的 $PATH 变量中,但仍然是同样的错误。
任何帮助将不胜感激! 谢谢!
【问题讨论】: