Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot switch to PHP @7.1 #55

Closed
ravisharmaa opened this issue Dec 10, 2018 · 5 comments
Closed

Cannot switch to PHP @7.1 #55

ravisharmaa opened this issue Dec 10, 2018 · 5 comments

Comments

@ravisharmaa
Copy link

I am having issues on switching php @ 7.1 with brew-php-switcher, I have Mojave. Below is the output i get.

Your system is ready to brew.

brew-php-switcher 7.1

Switching to php@7.1
Switching your shell
Unlinking /usr/local/Cellar/php@7.1/7.1.24_2... 0 symlinks removed
Linking /usr/local/Cellar/php@7.1/7.1.24_2...
Error: Could not symlink bin/pear
Target /usr/local/bin/pear
is a symlink belonging to php. You can unlink it:
  brew unlink php

To force the link and overwrite all conflicting files:
  brew link --overwrite php@7.1

To list all files that would be deleted:
  brew link --overwrite --dry-run php@7.1
You will need sudo power from now on
Switching your apache conf
Password:
Restarting apache
All done!```

``` php -v
PHP 7.2.12 (cli) (built: Nov 29 2018 00:54:39) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies
    with Zend OPcache v7.2.12, Copyright (c) 1999-2018, by Zend Technologies```
@cfont
Copy link

cfont commented Dec 10, 2018

+1, Had this problem today and could only successfully switch by using brew link --overwrite php@7.1 --force before trying to switch the whole thing over. I had the same the problem with the sphp script that I had found as a github script.

After updating the sphp script with this version (https://gist.github.com/csoseman/f53fc6dd70cf5a382b9fba7f84454961/raw), I don't seem to be having the same problem and hope this recipe will get updated soon.

@ravisharmaa
Copy link
Author

@cfont should i update the sphp script? from the gist you suggested? @philcook what do you suggest?

@cfont
Copy link

cfont commented Dec 12, 2018

@ravisharmaa , the fix we need for brew-php-switcher looks to be already applied in HEAD for this repository with #54 but we now need @philcook to create a new release from this and get it to trickle down so that brew update will pick it up.

Until this happens, you can get this with the --HEAD version of the code to your computer but I don't remember the steps to reset off the top of my head and it is something you have to remember to maintain until the official repo release catches up.

Using the sphp script is an alternate way to do the same thing, but it isn't a homebrew package so it has an extra step of maintenance headache because you would need to monitor that gist for changes and redownload when you need.

@ravisharmaa
Copy link
Author

@philcook can you please look into this, and release a new tag with this fix, i am having extreme problems with switching

@ravisharmaa
Copy link
Author

Thank you guys for not updating, i am using another script. and closing this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants