简体   繁体   English

/ usr / bin和/ usr / local / bin中的命令冲突

[英]command conflicts in /usr/bin and /usr/local/bin

I update gnu screen with homebrew which located in /usr/local/bin/screen , it conflicts with /usr/bin/screen . 我用位于/usr/local/bin/screen自制软件更新gnu屏幕,它与/usr/bin/screen冲突。

I can't write /usr/bin with sudo after update to OS X EI Capitan . 更新到OS X EI Capitan后,我无法用sudo编写/usr/bin What should I do to use /usr/local/bin/screen as default? 如何使用/usr/local/bin/screen作为默认值?

Your shell uses the first command it finds using your PATH . 您的shell使用它通过PATH找到的第一个命令。 The easy solution is thus to move /usr/local/bin first in your PATH so it's before /usr/bin . 最简单的办法是这样移动/usr/local/bin在你第一次PATH所以它之前 /usr/bin This means that all commands in /usr/local/bin will be taken before those with the same name in /usr/bin . 这意味着, 所有的命令/usr/local/bin将那些具有相同的名称之前,必须采取/usr/bin

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

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