brew链接新的php版本错误

brew link php70 is giving me the following error:

Warning: php@7.0 is keg-only and must be linked with --force
Note that doing so can interfere with building software.
If you need to have this software first in your PATH instead consider running:
  echo 'export PATH="/usr/local/opt/php@7.0/bin:$PATH"' >> ~/.bash_profile
  echo 'export PATH="/usr/local/opt/php@7.0/sbin:$PATH"' >> ~/.bash_profile

but in ~/.bash_profiles:

PATH=$PATH:/usr/local/opt/php@7.0/bin
export PATH

please tell me how I can solve it.

thanks.

dongshen2903
dongshen2903 它应该是〜/.bash_profile,而不是〜/.bash_profile。
大约 2 年之前 回复

1个回答



〜/ .bash_profile </ strong>文件中添加下一行:</ p>

  export PATH =“/ usr / local / opt / php @ 7.0 / bin:$ PATH”
export PATH =“/ usr / local / opt / php @ 7.0 / sbin:$ PATH”
</ code > </ pre>

或尝试添加〜/ .bashrc </ strong>文件中的下一行</ p>

  export PATH =“/  usr/local/opt/php@7.0/bin:$ PATH“
export PATH =”/ usr / local / opt / php @ 7.0 / sbin:$ PATH“
</ code> </ pre>
</ DIV>

展开原文

原文

Add next lines to your ~/.bash_profile file:

export PATH="/usr/local/opt/php@7.0/bin:$PATH"
export PATH="/usr/local/opt/php@7.0/sbin:$PATH"

Or try adding the next lines in ~/.bashrc file

export PATH="/usr/local/opt/php@7.0/bin:$PATH"
export PATH="/usr/local/opt/php@7.0/sbin:$PATH"

duanfangbunao36970
duanfangbunao36970 “没有工作”是什么意思?
大约 2 年之前 回复
dtncv04228
dtncv04228 谢谢你的回答,我刚试过没办法
2 年多之前 回复
Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
立即提问