Uninstall/Reinstall leiningen(clojure server) related issues

删除回忆录丶 提交于 2019-11-30 22:44:01

问题


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. And I was told not to use sudo. I use Mac OS X 10.6.4.

So, I'll try to uninstall and reinstall leiningen.

Uninstalling leiningen

  • Removing ~/.m2 directory is just uninstall, is this correct?

(Re)installing leiningen

I followed the steps explained here.

  1. copy the 'lein' to ~/bin/lein and make it runnable.
  2. Run 'lein self-install', and I see ~/.m2/repository is installed.
  3. download leiningen using 'http://github.com/technomancy/leiningen.git' to ~/bin/leinigen

    • At this stage, I can't run 'lein help', but '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.

Questions

  • Q : How to uninstall perfectly with leiningen?
  • Q : Why using 'sudo' makes lein correctly?

回答1:


yes removing .m2 and then lein self-install should fix this :)

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. you could perhaps also just change the user on them back to yourself.

chown username:users ~/.m2/*


来源:https://stackoverflow.com/questions/3363681/uninstall-reinstall-leiningenclojure-server-related-issues

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!