php 卸载 Laravel Valet
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/40276967/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Uninstall Laravel Valet
提问by Sina
I installed Valet for the first time and I had some problems listed below:
我第一次安装 Valet 时遇到了一些问题,如下所示:
- It throws an error saying:
- 它抛出一个错误说:
Unable to determine linked PHP.
无法确定链接的 PHP。
Even though I have PHP 7.1 installed by php-osx.liip.chso it just goes ahead and installs PHP 7.0 with homebrew anyway!
尽管我已经通过php-osx.liip.ch安装了 PHP 7.1,所以它还是继续安装 PHP 7.0 和自制软件!
- In the non-laravel projects my localhost does not work and it responds:
- 在非 Laravel 项目中,我的本地主机不起作用,它响应:
ERR_EMPTY_RESPONSE
ERR_EMPTY_RESPONSE
and then Valet itself does not work either!
然后代客本身也不起作用!
- I'm getting an error on Valet domains with message:
- 我在 Valet 域上收到错误消息:
This site can't be reached laravel_from_scratch.dev's server DNS address could not be found.
无法访问此站点 找不到 laravel_from_scratch.dev 的服务器 DNS 地址。
So I decided to uninstall it by running $ valet uninstall
, it returns the corresponding response but then when I'm running $ valet
it is all there! How to uninstall it correctly?
所以我决定通过运行卸载它$ valet uninstall
,它返回相应的响应,但是当我运行时$ valet
它就在那里!如何正确卸载?
BTW, I posted this issue also on the Valet GitHub page.
顺便说一句,我也在Valet GitHub 页面上发布了这个问题。
回答by Sina
I guess I find the solution after a little bit playing around.
我想我在玩了一会儿之后找到了解决方案。
It seems Valet uninstall
command does not work as expected. To uninstall it first run the composer command to uninstall the php dependencies:
似乎 Valetuninstall
命令没有按预期工作。要卸载它,请先运行 composer 命令以卸载 php 依赖项:
$ composer global remove laravel/valet
$ composer global remove laravel/valet
then to uninstall the dependencies installed with the Homebrew, first run;
然后卸载 Homebrew 安装的依赖项,首先运行;
$ brew list
just so you know we are in the same page then if you see dnsmasq
and php70
in case you do not want them or you have php7 installed in another approach (like me) run:
只是为了让您知道我们在同一页面中,然后如果您看到dnsmasq
并且php70
如果您不想要它们或者您以另一种方法(像我一样)安装了 php7,请运行:
$ brew uninstall dnsmasq
and
和
$ brew uninstall php70
Then go to your user directory and delete the .valet
hidden directory or run the terminal command like so:
然后转到您的用户目录并删除.valet
隐藏目录或像这样运行终端命令:
$ sudo rm -r ~/.valet
回答by Torkil Johnsen
An official response here: https://github.com/laravel/valet/issues/341#issuecomment-287048987
这里的官方回复:https: //github.com/laravel/valet/issues/341#issuecomment-287048987
valet uninstall
sudo brew services stop nginx
sudo brew services stop php70
sudo brew services stop dnsmasq
brew uninstall nginx
brew uninstall php70
brew uninstall dnsmasq
rm -rf ~/.valet
rm /usr/local/bin/valet