问题描述
当我在提出并回答问题时,我发现运行 sudo lein deps会导致一些问题,迫使我运行 sudo lein swank,这是恼人的。和我使用Mac OS X 10.6.4。
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.
所以,我会尝试卸载并重新安装leiningen。
So, I'll try to uninstall and reinstall leiningen.
- 删除〜/ .m2目录只是卸载这正确吗?
。
- 将'lein'复制到〜/ bin / lein并使其可运行。
- 运行'lein self-install',我看到〜/ .m2 /
-
使用'to〜/ bin / leinigen
- copy the 'lein' to ~/bin/lein and make it runnable.
- Run 'lein self-install', and I see ~/.m2/repository is installed.
download leiningen using 'http://github.com/technomancy/leiningen.git' to ~/bin/leinigen
- 在这个阶段, lein help,但 sudo lein help。
- 因此,我无法运行lein deps,但 sudo lein deps,并且问题变成递归的。
- At this stage, I can't run 'lein help', but 'sudo lein help'. What's wrong with this?
问题
- 问:为什么使用sudo可以正确使用lein?
推荐答案
是删除.m2然后 lein自安装
应该解决这个问题:)
yes removing .m2 and then lein self-install
should fix this :)
当你可以sudo lein ...它创建的.m2文件由root拥有,所以删除这些,然后重新创建作为适当的用户(你)应该修复它。
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/*
这篇关于卸载/重新安装leiningen(clojure服务器)相关问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!