Skip to content
This repository has been archived by the owner on May 3, 2022. It is now read-only.

Support för Sierra #19

Closed
olofbokedal opened this issue Sep 24, 2016 · 6 comments
Closed

Support för Sierra #19

olofbokedal opened this issue Sep 24, 2016 · 6 comments

Comments

@olofbokedal
Copy link

Yolo etc, so I've upgraded to Sierra without knowing anything prior.

After the upgrade, I ran brew doctor to get some clues about the status. It led me to:

  • Fix the permissions of /usr/local
  • Update XQuarts
  • Fixed my PATH

I also ran xcode-select --install just to make sure that I got the latest version of command line tools. Which I didn't.

I then ran brew update which told me to change ownership of /usr/local once again, so I did. Then finally brew upgrade which took some time to execute.

Nothing strange going on so far, but I noticed that my ~/.profile wasn't being read, so I moved the contents of that file to ~/.bash_profile in order to include everything needed by Odd Environment. Now oddenv worked and changed the contents of some files.

Everything seems to be working except for Apache. I tried to start it manually by apachectl, but it says:

httpd: Syntax error on line 121 of /private/etc/apache2/httpd.conf: Cannot load /usr/local/opt/php55/libexec/apache2/libphp5.so into server: dlopen(/usr/local/opt/php55/libexec/apache2/libphp5.so, 10): image not found

so I guess there's a problem with PHP.

To be continued...

@olofbokedal olofbokedal self-assigned this Sep 24, 2016
@olofbokedal
Copy link
Author

With the release of macOS Sierra the Apache module is now not built by default. If you want to build it on your system you have to install php with the --with-apache option. See brew options php55 for more details.

might be relevant...

@olofbokedal
Copy link
Author

Added with-apache to the brewfile, but php55 can't be installed due to

Error: Permission denied - /usr/local/var/log/apache2/access_log

@olofbokedal
Copy link
Author

Fixed the permissions, but now I'm getting

Sorry, I cannot run apxs.  Possible reasons follow:

1. Perl is not installed
2. apxs was not found. Try to pass the path using --with-apxs2=/path/to/apxs
3. Apache was not built using --enable-so (the apxs usage page is displayed)

The output of /usr/sbin/apxs follows:
apxs:Error: /Applications/Xcode.app/Contents/Developer/Toolchains/OSX10.12.xctoolchain/usr/local/bin/apr-1-config not found!.

@olofbokedal
Copy link
Author

Found some helpful stuff in https://github.com/Homebrew/homebrew-php/issues/3283#issuecomment-239678929.

sudo mkdir -p /Applications/Xcode.app/Contents/Developer/Toolchains/OSX10.12.xctoolchain/usr/local/bin/
sudo ln -s /usr/local/opt/apr/bin/apr-1-config /Applications/Xcode.app/Contents/Developer/Toolchains/OSX10.12.xctoolchain/usr/local/bin/
sudo ln -s /usr/local/opt/apr-util/bin/apu-1-config /Applications/Xcode.app/Contents/Developer/Toolchains/OSX10.12.xctoolchain/usr/local/bin/

got it working. But Homebrew failed to link php55 since /usr/local/opt/php55 wasn't empty, so I simply sudo rm -r /usr/local/opt/php55 and re-installed php55 once again.

@olofbokedal
Copy link
Author

Everything seems to be working no, so to summarize the steps required:

$ brew uninstall php55
$ sudo rm -r /usr/local/opt/php55
$ sudo mkdir -p /Applications/Xcode.app/Contents/Developer/Toolchains/OSX10.12.xctoolchain/usr/local/bin/
$ sudo ln -s /usr/local/opt/apr/bin/apr-1-config /Applications/Xcode.app/Contents/Developer/Toolchains/OSX10.12.xctoolchain/usr/local/bin/
$ sudo ln -s /usr/local/opt/apr-util/bin/apu-1-config /Applications/Xcode.app/Contents/Developer/Toolchains/OSX10.12.xctoolchain/usr/local/bin/
$ oddenv

We COULD include line 3-5 in the PHP puppet, but I don't think we should since I don't really understand why it's necessary. Hopefully it won't be in the future.

I'll leave this issue open for further discussions.

@olofbokedal olofbokedal removed their assignment Sep 26, 2016
@javian
Copy link

javian commented Sep 26, 2016

You should no longer need to modify any of this and php should install out of the box. There are still a few issues with the bottles due to a bug in brew so they need to be rebuilt (for 7.0 at least) If you need to apache module that is no longer the default and you need to put in the additional option --with-apache to make it compile the module.

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

No branches or pull requests

2 participants