简体   繁体   English

在MacOS Sierra上升级PHP

[英]Upgrading PHP on MacOS Sierra

I'm trying to update my php to the current version on my MacOS Sierra. 我试图将我的php更新到MacOS Sierra上的当前版本。

  1. When I type in vi ~/.bash-profile, all I get is a series of "~". 当我输入vi〜/ .bash-profile时,我得到的只是一系列“〜”。 How exactly do I update the PATH? 我究竟如何更新PATH?

  2. sudo vi /usr/local/php5/php.d/99-liip-developer.ini gives me a ton of text, and when I try to run the next command (sudo cat /Library/Server/Web/Config/php/local.ini >> /usr/local/php5/php.d/99-liip-developer.ini) I get permission denied. sudo vi /usr/local/php5/php.d/99-liip-developer.ini给了我很多文本,当我尝试运行下一个命令时(sudo cat / Library / Server / Web / Config / php / local.ini >> /usr/local/php5/php.d/99-liip-developer.ini)我被拒绝了权限。 How do I go about this? 我该怎么办?

在此处输入图片说明

To answer your questions: 要回答您的问题:

  1. If you are not familiar with the vi editor, you probably want to use another text editor. 如果您不熟悉vi编辑器,则可能要使用其他文本编辑器。 On OS X for example (this should open TextEdit normally...): 例如,在OS X上(应正常打开TextEdit ...):
    $ open ~/.bash_profile
    If that does not give you TextEdit, you can also do: 如果那不能给您TextEdit,您也可以执行以下操作:
    $ open -a TextEdit ~/.bash_profile
  2. If your user doesn't have sudo permissions, you need to login as root or as a user who does have super user privileges. 如果您的用户没有sudo权限,则需要以root用户或具有超级用户权限的用户身份登录。 That would be the only way you can change that file. 那是更改该文件的唯一方法。

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

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