I get the following error when I run MNPP, which is a like XAMPP/MAMP but with Nginx instead of Apache.
$ sudo mnpp --php53 --start
-n Starting php-fpm
dyld: Library not loaded: /opt/X11/lib/libfreetype.6.dylib
Referenced from: /usr/X11/lib/libfontconfig.1.dylib
Reason: Incompatible library version: libfontconfig.1.dylib requires version 17.0.0 or later, but libfreetype.6.dylib provides version 14.0.0
/Applications/MNPP/init/php.sh: line 95: 44087 Trace/BPT trap: 5 $php_fpm_BIN $php_opts
failed
Judging from all the SO threads on this topic, I'm pretty sure this is a X11/XQuartz Mac OSX Mavericks issue as it this command works on my previous Mac with 10.7.5.
How do I upgrade my version of libfreetype.6.dylib?
You likely have the DYLD_LIBRARY_PATH environment variable set. Don't do that.
Related
I am on the Apple M1 arm64 chip arm64.
uname -m
arm64
I am trying to install the PHP 8.2 module for Apache, e.g.
LoadModule php8_module /opt/homebrew/Cellar/php/8.2.1/lib/httpd/modules/libphp.so
...however when I do so I encounter the following error:
apachectl -S
httpd: Syntax error on line 183 of
/usr/local/etc/httpd/httpd.conf: Cannot load
/opt/homebrew/Cellar/php/8.2.1/lib/httpd/modules/libphp.so into
server:
dlopen(/opt/homebrew/Cellar/php/8.2.1/lib/httpd/modules/libphp.so,
0x000A): tried:
'/opt/homebrew/Cellar/php/8.2.1/lib/httpd/modules/libphp.so' (mach-o
file, but is an incompatible architecture (have 'arm64', need
'x86_64')),
'/System/Volumes/Preboot/Cryptexes/OS/opt/homebrew/Cellar/php/8.2.1/lib/httpd/modules/libphp.so'
(no such file),
'/opt/homebrew/Cellar/php/8.2.1/lib/httpd/modules/libphp.so' (mach-o
file, but is an incompatible architecture (have 'arm64', need
'x86_64'))
file `which php`
/usr/local/bin/php: Mach-O 64-bit executable arm64
file `which httpd`
/usr/local/bin/httpd: Mach-O 64-bit executable x86_64
From memory, Apache was installed with the old version of Homebrew on an Intel chip Mac and was imported into the new MBP on the M1 chip.
PHP (8.2) was installed recently using the fresh Homebrew install for arm64.
What are my options? Uninstall Apache and re-install then reconfigure?
I've had the same issue and did try to reinstall apache (upgraded osx), but did not work.
I finally found out that if I ran Apache under the old architecture using Rosetta, it worked. Not the result I had hoped for, but I've wasted HOURS on this already so, it's good enough for me.
To do so, simply prefix you terminal command with "arch -x86_64", ie:
arch -x86_64 sudo apachectl -k restart
HTH
Recently I updated my machine to MacOS Sierra 10.12 and it caused the MAMP 4.0 php version 5.3.29 (downloaded from MAMP website) makes Apache unable to start up.
I use terminal to start as per this command:
sudo /Applications/MAMP/Library/bin/apachectl start
It throws the following error:
httpd: Syntax error on line 135 of /Applications/MAMP/conf/apache/httpd.conf: Cannot load /Applications/MAMP/bin/php/php5.3.29/modules/libphp5.so into server: dlopen(/Applications/MAMP/bin/php/php5.3.29/modules/libphp5.so, 10): Library not loaded: /Applications/MAMP/Library/lib/libfreetype.6.dylib\n Referenced from: /Applications/MAMP/bin/php/php5.3.29/modules/libphp5.so\n Reason: Incompatible library version: libphp5.so requires version 19.0.0 or later, but libfreetype.6.dylib provides version 17.0.0
What is the issue?
I'm stuck. I am trying to install Apache stack on OSX 10.10.3 and i can not get PHP56 to work with Apache. I am getting
httpd: Syntax error on line 171 of /private/etc/apache2/httpd.conf: Cannot load /usr/local/Cellar/php56/5.6.10/libexec/apache2/libphp5.so into server: dlopen(/usr/local/Cellar/php56/5.6.10/libexec/apache2/libphp5.so, 10): Library not loaded: /usr/local/opt/apr-util/libexec/lib/libaprutil-1.0.dylib\n Referenced from: /usr/local/Cellar/php56/5.6.10/libexec/apache2/libphp5.so\n Reason: Incompatible library version: libphp5.so requires version 6.0.0 or later, but libaprutil-1.0.dylib provides version 4.0.0
when running
sudo bash -x /usr/sbin/apachectl -k restart
I fixed it but I don't know how precisly.
Basically I've reinstalled all PHP packages installed trough brew, and I went back to use Apache 2.4 originally installed on OSX, and not that one from brew.
I'm not very good when it comes to managing libraries on mac os x. I'm running php56-fpm on mac and getting the following errors:
dyld: Library not loaded: /usr/local/lib/libpng16.16.dylib
Referenced from: /usr/local/Cellar/php56/5.6.9/sbin/php-fpm
Reason: Incompatible library version: php-fpm requires version 34.0.0 or later, but libpng16.16.dylib provides version 29.0.0
/usr/local/opt/php56/sbin/php56-fpm: line 53: 38984 Trace/BPT trap: 5 $php_fpm_BIN --daemonize $php_opts
failed
Obviously I have an old library of libpng installed. Normally I'd remove it, find an updated version of the library and install. Unfortunately, I do not know how to do this on mac. I've tried uninstall and reinstalling with brew, but I keep grabbing the outdated libpng. How can I get the new updated version?
Good day.
I have a problem with Apache configuring on my Mac.
I installed apache and php from MacPorts, apache works fine.
When I add line
Include conf/extra/mod_php.conf
and restart apache - here is an error:
httpd: Syntax error on line 119 of /private/etc/apache2/httpd.conf: Cannot load /opt/local/apache2/modules/libphp5.so into server: dlopen(/opt/local/apache2/modules/libphp5.so, 10): Library not loaded: /opt/local/lib/libaprutil-1.0.dylib\n Referenced from: /opt/local/apache2/modules/libphp5.so\n Reason: Incompatible library version: libphp5.so requires version 6.0.0 or later, but libaprutil-1.0.dylib provides version 4.0.0
So, this is my question: what should I do for resolve this problem?
thanks a lot!
Good luck.
Ditch MacPort and install MAMP from this link.
MAMP installer comes with Apache, PHP and MySQL bundled.
Update: There is a better LAMP package available now on OSX called AMPPS.