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

发布于 2024-09-11 23:56:40 字数 1163 浏览 1 评论 0原文

当我在此处询问并回答时,我发现运行“sudo lein deps”会导致一些问题,迫使我运行“sudo lein swank”,这很烦人。并且我被告知不要使用sudo我使用 Mac OS X 10.6.4。

因此,我将尝试卸载并重新安装 leiningen。

卸载 leiningen

  • 删除 ~/.m2 目录只是卸载,这是正确的吗?

(重新)安装 leiningen

我按照此处说明的步骤进行操作。

  1. 将 'lein' 复制到 ~/bin/lein 并使其可运行。
  2. 运行“lein self-install”,我看到 ~/.m2/repository 已安装。
  3. 使用 'http://github.com/technomancy/leiningen.git 下载 leiningen ' 到 ~/bin/leinigen

    • 现阶段,我无法运行“lein help”,但可以运行“sudo lein help”。这有什么问题吗?
  4. 结果,我无法运行“lein deps”,而是运行“sudo lein deps”,问题就变成了递归问题。

问题

  • 问:如何用leiningen完美卸载?
  • 问:为什么使用“sudo”可以正确执行 lein?

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?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

明明#如月 2024-09-18 23:56:40

是的,删除 .m2 然后 lein self-install 应该可以解决这个问题:)

当您可以 sudo lein ...它在 root 拥有的 .m2 中创建文件时,请删除这些文件,然后以正确的用户身份重新创建它们(你)应该修复它。您也许也可以将其用户更改回您自己。

chown username:users ~/.m2/*

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/*
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文