0
我正在嘗試關注這個tutuorial https://devcenter.heroku.com/articles/clojure-web-application。儘管我在設置本地postgresql數據庫進行測試時遇到了一些困難。使用clojure與Windows一起設置本地PostgreSQL實例?
第一個障礙是在windows shell中運行「postgres -D pg」導致「不允許使用具有管理權限的用戶執行PostgreSQL」的錯誤。爲了得到一個回合,我試着運行pg_ctl start -D。\我想它是有效的,除了它不能訪問「postgresql.conf」文件。
運行「creatdb shouter」也沒有工作,所以我跑了「createdb -U postgres shouter」。但現在當我嘗試推出雷音REPL,我剛剛得到這個錯誤:
$lein repl
Could not find artifact postgresql:postgresql:pom:8.4-702.qdbc4 in central (http://repo1.maven.org/maven2
Could not find artifact postgresql:postgresql:pom:8.4-702.qdbc4 in clojars (https://clojars.org/repo/)
Could not find artifact postgresql:postgresql:jar:8.4-702.qdbc4 in central (http://repo1.maven.org/maven2
Could not find artifact postgresql:postgresql:jar:8.4-702.qdbc4 in clojars (https://clojars.org/repo/)
Check :dependencies and :repositories for typos.
It's possible the specified jar is not in any repository.
If so, see "Free-floating Jars" under http://j.mp/repeatability
Exception in thread "Thread-1" clojure.lang.ExceptionInfo: Could not resolve dependencies {:exit-code 1}
at clojure.core$ex_info.invoke(core.clj:4227)
at leiningen.core.classpath$get_dependencies.doInvoke(classpath.clj:128)
at clojure.lang.RestFn.invoke(RestFn.java:425)
at clojure.lang.AFn.applyToHelper(AFn.java:163)
at clojure.lang.RestFn.applyTo(RestFn.java:132)
at clojure.core$apply.invoke(core.clj:605)
at leiningen.core.classpath$resolve_dependencies.doInvoke(classpath.clj:144)
at clojure.lang.RestFn.invoke(RestFn.java:425)
at leiningen.core.eval$prep.invoke(eval.clj:60)
at leiningen.core.eval$eval_in_project.invoke(eval.clj:220)
at leiningen.repl$start_server.doInvoke(repl.clj:65)
at clojure.lang.RestFn.invoke(RestFn.java:470)
at leiningen.repl$repl$fn__1788.invoke(repl.clj:145)
at clojure.lang.AFn.applyToHelper(AFn.java:159)
at clojure.lang.AFn.applyTo(AFn.java:151)
at clojure.core$apply.invoke(core.clj:601)
at clojure.core$with_bindings_STAR_.doInvoke(core.clj:1771)
at clojure.lang.RestFn.invoke(RestFn.java:425)
at clojure.lang.AFn.applyToHelper(AFn.java:163)
at clojure.lang.RestFn.applyTo(RestFn.java:132)
at clojure.core$apply.invoke(core.clj:605)
at clojure.core$bound_fn_STAR_$fn__3984.doInvoke(core.clj:1793)
at clojure.lang.RestFn.invoke(RestFn.java:397)
at clojure.lang.AFn.run(AFn.java:24)
at java.lang.Thread.run(Unknown Source)
你真的應該考慮在Linux而不是Windows這樣做。 – Falmarri
Windows是好的,至少在我看來應該是Clojure的一流開發環境(我們*應該努力做到這一點),如果你不想在Linux機器上運行PostgreSQL實例並保持在你的舒適的Windows環境,然後使用PuTTY在Linux機箱上添加一個「本地端口forwad」到端口5432可以使這更方便。 –