Run 'lein repl', then copy in and run the code below.  Post back
whether you get an error (and what it is), or if it finishes without a
problem (this is downloading a 50MB file, so give it a few minutes).

(import 'java.io.File)

(import 'java.net.URL)

(require '[clojure.java.io :as io])

(def u (URL. 
"http://repo1.maven.org/maven2/.index/nexus-maven-repository-index.zip";))

(defn download-index [url]
  (with-open [stream (.openStream url)]
    (println "Downloading index from" "-" url "... this may take a while.")
    (let [tmp (java.io.File/createTempFile "lein" "index")]
      (try (io/copy stream tmp)
           (println "copied stream to tmp: " tmp)
           (finally (.delete tmp))))))

(download-index u)



On Fri, Oct 14, 2011 at 2:26 PM, Bruce Gordon <brucebgor...@gmail.com> wrote:
> I am in a VirtualBox VM (running SimplyMepis) hosted in Windows Vista.
> From within the vm I can download those files from a browser.
>
> On Oct 14, 2:17 pm, Mark Rathwell <mark.rathw...@gmail.com> wrote:
>> Are you behind a firewall or proxy that would be blocking .zip files?
>> lein search first makes sure it has an updated index from those
>> repositories, and if not tries to download and unzip those index
>> files:
>>
>> http://repo1.maven.org/maven2/.index/nexus-maven-repository-index.ziphttp://clojars.org/repo/.index/nexus-maven-repository-index.zip
>>
>> Can you download those files in a browser?
>>
>> (Also, there is a lein specific group 
>> athttp://groups.google.com/group/leiningen)
>>
>>  - Mark
>>
>>
>>
>>
>>
>>
>>
>> On Fri, Oct 14, 2011 at 1:55 PM, Bruce Gordon <brucebgor...@gmail.com> wrote:
>> > I first followed the directions 
>> > athttp://riddell.us/ClojureSwankLeiningenWithEmacsOnLinux.html
>> > , but then abandoned that effort thanks to irc advice. I then started
>> > following 
>> > thehttp://dev.clojure.org/display/doc/Getting+Started+with+Leiningen
>> > directions. However I suspect I am not configured properly since the
>> > search isn't working-see below.
>>
>> >  bruce@mepis1:~/bin$ lein search hadoop
>> >  Warning: couldn't download index forhttp://repo1.maven.org/maven2
>> >  Warning: couldn't download index forhttp://clojars.org/repo/
>>
>> > bruce@mepis1:~/bin$ lein version
>> > Leiningen 1.6.1.1 on Java 1.6.0_26 Java HotSpot(TM) 64-Bit Server VM
>>
>> > Next I backed out my explicit install of ant and maven via >apt-get
>> > remove ant and >apt-get remove maven2
>>
>> > but lein still yields the same result.
>>
>> > Should I uninstall lein (how?), and start over?
>>
>> > --
>> > You received this message because you are subscribed to the Google
>> > Groups "Clojure" group.
>> > To post to this group, send email to clojure@googlegroups.com
>> > Note that posts from new members are moderated - please be patient with 
>> > your first post.
>> > To unsubscribe from this group, send email to
>> > clojure+unsubscr...@googlegroups.com
>> > For more options, visit this group at
>> >http://groups.google.com/group/clojure?hl=en
>
> --
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to clojure@googlegroups.com
> Note that posts from new members are moderated - please be patient with your 
> first post.
> To unsubscribe from this group, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Reply via email to