简体   繁体   English

卸载/重新安装leiningen(clojure服务器)相关问题

[英]Uninstall/Reinstall leiningen(clojure server) related issues

As I asked and answered here , I found that running ' sudo lein deps causes some problem that forces me to run ' sudo lein swank', which is annoying. 正如我在这里问到并回答的那样,我发现运行' sudo lein deps会导致一些问题迫使我跑' sudo lein swank',这很烦人。 And I was told not to use sudo . 我被告知不要使用sudo I use Mac OS X 10.6.4. 我使用的是Mac OS X 10.6.4。

So, I'll try to uninstall and reinstall leiningen. 所以,我会尝试卸载并重新安装leiningen。

Uninstalling leiningen 卸载leiningen

  • Removing ~/.m2 directory is just uninstall, is this correct? 删除〜/ .m2目录只是卸载,这是正确的吗?

(Re)installing leiningen (重新)安装leiningen

I followed the steps explained here . 我按照这里解释的步骤。

  1. copy the 'lein' to ~/bin/lein and make it runnable. 将'lein'复制到〜/ bin / lein并使其可运行。
  2. Run 'lein self-install', and I see ~/.m2/repository is installed. 运行'lein self-install',我看到〜/ .m2 / repository已安装。
  3. download leiningen using ' http://github.com/technomancy/leiningen.git ' to ~/bin/leinigen 使用' http://github.com/technomancy/leiningen.git '将leiningen下载到〜/ bin / leinigen

    • At this stage, I can't run 'lein help', but ' sudo lein help'. 在这个阶段,我不能运行'lein help',而是' sudo lein help'。 What's wrong with this? 这有什么问题?
  4. As a result, I can't run 'lein deps', but ' sudo lein deps, and the problem becomes recursive one. 结果,我不能运行'lein deps',而是' sudo lein deps,问题就变成了递归问题。

Questions 问题

  • Q : How to uninstall perfectly with leiningen? 问:如何与leiningen完美卸载?
  • Q : Why using 'sudo' makes lein correctly? 问:为什么使用'sudo'能正确使用lein?

yes removing .m2 and then lein self-install should fix this :) 是删除.m2然后lein self-install应修复这个:)

when you can sudo lein ... it created files in .m2 owned by root so removing these and then recreating them as the proper user (you) should fix it. 什么时候你可以sudo lein ...它在root拥有的.m2中创建文件,所以删除它们然后重新创建它们,因为正确的用户(你)应该修复它。 you could perhaps also just change the user on them back to yourself. 你或许也可以将用户改回自己。

chown username:users ~/.m2/*

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM