brew doctor throwing loads of errors? - laravel

I recently installed Laravel on my Mac to begin learning about it as I've heard good things.
My first error was while accessing /public/:
Laravel requires the Mcrypt PHP extension.
I then installed php54-mcrypt and continued learning yesterday evening.
I then came home today from work, hit 'brew update' and then the same error appeared?
I then ran brew install php54-mcrypt to receive:
Warning: php54-mcrypt-5.4.16 already installed
I then ran brew doctor to receive;
Warning: "config" scripts exist outside your system or Homebrew directories
./configure scripts often look for *-config scripts to determine if
software packages are installed, and what additional flags to use when
compiling and linking.
Having additional scripts in your path can confuse software installed via
Homebrew if the config script overrides a system or Homebrew provided
script of the same name. We found the following "config" scripts:
/opt/sm/pkg/active/bin/curl-config
/opt/sm/pkg/active/bin/ncurses5-config
/opt/sm/pkg/active/bin/ncursesw5-config
/opt/sm/pkg/active/bin/pkg-config
/opt/sm/pkg/active/bin/xml2-config
/opt/sm/pkg/active/bin/xslt-config
PHP Warning: PHP Startup: Unable to load dynamic library
'/usr/local/Cellar/php54-mcrypt/5.4.16/mcrypt.so' -
dlopen(/usr/local/Cellar/php54-mcrypt/5.4.16/mcrypt.so, 9):
Library not loaded: /usr/local/lib/libmcrypt.4.4.8.dylib
Referenced from: /usr/local/Cellar/php54-mcrypt/5.4.16/mcrypt.so
Reason: image not found in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library
'/usr/local/Cellar/php54-mcrypt/5.4.16/mcrypt.so' -
dlopen(/usr/local/Cellar/php54-mcrypt/5.4.16/mcrypt.so, 9):
Library not loaded: /usr/local/lib/libmcrypt.4.4.8.dylib
Referenced from: /usr/local/Cellar/php54-mcrypt/5.4.16/mcrypt.so
Reason: image not found in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library
'/usr/local/Cellar/php54-mcrypt/5.4.16/mcrypt.so' -
dlopen(/usr/local/Cellar/php54-mcrypt/5.4.16/mcrypt.so, 9):
Library not loaded: /usr/local/lib/libmcrypt.4.4.8.dylib
Referenced from: /usr/local/Cellar/php54-mcrypt/5.4.16/mcrypt.so
Reason: image not found in Unknown on line 0

The stuff in /usr/local/Cellar was put there by MacPorts, an earlier package manager for mac. You probably want to remove that. https://guide.macports.org/chunked/installing.macports.uninstalling.html

Related

Unable to use dcmtk commands like dcmodify and dcmscale

System: M1 MacBook air
I created a duplicate terminal that runs with rosetta 2 for installing dcmtk since it's not available for apple chips yet. In the duplicate terminal, I was able to install dcmtk successfully.
On running dcmodify, I get
dyld: Library not loaded: #rpath/libdcmdata.16.dylib
Referenced from: /usr/local/homebrew/bin/dcmodify
Reason: image not found
zsh: abort dcmodify
dcmscale also gives throws a similar error.
dyld: Library not loaded: #rpath/libdcmimage.16.dylib
Referenced from: /usr/local/homebrew/bin/dcmscale
Reason: image not found
zsh: abort dcmscale
How do I fix these errors?
Edit-1: Reinstalling DCMTK made no difference. The error still persists.
Edit-2: I have attached the logs for brew info dcmtk
Since you are using the terminal with rosetta 2, try adding export PATH="/usr/local/homebrew/bin:$PATH" in ~/.bashrc file
If this doesn't work, add export PATH="/usr/local/homebrew/bin:$PATH" in ~/.zshrc file
Adding these paths should work

Switch icu4c version (Homebrew)

When running composer commands I get an error and it seems I have to change the icu4c version. (At the moment I need a composer command to re(install) - composer global require weprovide/valet-plus) However, when I try to change it using the steps below I get errors.
Error when running composer command (globally):
dyld: Library not loaded: /usr/local/opt/openldap/lib/libldap-2.4.2.dylib
Referenced from: /usr/local/bin/php
Reason: image not found
[2] 12103 abort composer global require weprovide/valet-plus
Steps taken to change icu4c version:
$ cd $(brew --prefix)/Homebrew/Library/Taps/homebrew/homebrew-core/Formula
$ git checkout 2a369a82c7f5b3b2ab2704ff0796635514aae955
$ brew reinstall ./icu4c.rb
Error when reinstall icu4c.rb:
Error: Failed to load cask: ./icu4c.rb
Cask 'icu4c' is unreadable: wrong constant name #<Class:0x00007fba9a59e168>
Warning: Treating ./icu4c.rb as a formula.
==> Downloading https://ghcr.io/v2/homebrew/core/icu4c/manifests/67.1
##O#- #
curl: (22) The requested URL returned error: 404
Error: Failed to download resource "icu4c_bottle_manifest"
Download failed: https://ghcr.io/v2/homebrew/core/icu4c/manifests/67.1
Anyone who knows how to tackle this? I guess version 67.1 is needed for everything to work. Please let me know if you know anything that might be helpful, thanks in advance!

dyld: Symbol not found: _OPENSSL_init_ssl

I just installed ffsend and wget via homebrew on my MacOS (Mojave 10.14.6), and when I run the command
ffsend upload some_file.tgz
or
wget some_url some_file.tgz
I get the following:
dyld: lazy symbol binding failed: Symbol not found: _OPENSSL_init_ssl
Referenced from: /usr/local/bin/ffsend Expected in:
/usr/local/opt/openssl#1.1/lib/libssl.1.1.dylib
dyld: Symbol not found: _OPENSSL_init_ssl Referenced from:
/usr/local/bin/ffsend Expected in:
/usr/local/opt/openssl#1.1/lib/libssl.1.1.dylib
Abort trap: 6
I know I've had some bugs with Open SSL previously, but I have no idea of how to tackle this problem.
Thanks
The problem was due to a conflict between versions of OpenSSL. Some programs (wget, ffsend) needed the latest version of OpenSSL, while some other programs (not distributed) needed an older version of OpenSSL, namely 1.0.2.
I found the solution here: after reinstalling openssl via brew reinstall openssl#1.1, I used brew switch openssl 1.0.2q.
This way I can use both programs that need the latest version and those that use the older one.

macOS php71 became php#7.1 with brew

One day ago I had the normal php71 installed with brew with command brew install php71
I was trying to install gmp extension like brew install php71-gmp but it didn't worked so i used some kind of code from google search and made my php71 to become php#7.1 and now none of extensions (like redis/php71-redis) are not working.
now tryng to install php71 but it still installs php#7.1.. found homebrew/php/php71 and trying to install but then got this message:
Warning: Use php#7.1 instead of deprecated homebrew/php/php71
Warning: php#7.1 7.1.15 is already installed`
Trying everything to get run php71 with redis mcryt imagic gmp and so on..
brew config:
HOMEBREW_VERSION: 1.5.13
ORIGIN: https://github.com/Homebrew/brew
HEAD: 0f4e22e28d3b65a6c8dbb0f270bb6d262a2429d6
Last commit: 2 days ago
Core tap ORIGIN: https://github.com/Homebrew/homebrew-core
Core tap HEAD: a59f6d2736fdd1acb3c71380e1e46b861146b609
Core tap last commit: 65 minutes ago
HOMEBREW_PREFIX: /usr/local
CPU: quad-core 64-bit broadwell
Homebrew Ruby: 2.3.3 => /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/bin/ruby
Clang: 9.0 build 900
Git: 2.14.3 => /Library/Developer/CommandLineTools/usr/bin/git
Curl: 7.54.0 => /usr/bin/curl
Perl: /usr/bin/perl
Python: /usr/bin/python
Ruby: /usr/bin/ruby => /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/bin/ruby
Java: 1.8.0_162
macOS: 10.13.3-x86_64
Xcode: 9.3
CLT: 9.2.0.0.1.1510905681
X11: N/A
brew doctor dump
Please note that these warnings are just used to help the Homebrew maintainers
with debugging if you file an issue. If everything you use Homebrew for is
working fine: please don't worry or file an issue; just ignore this. Thanks!
Warning: Some directories in your path end in a slash.
Directories in your path should not end in a slash. This can break other
doctor checks. The following directories should be edited:
/Users/pauliuslukosiunas/.composer/vendor/squizlabs/php_codesniffer/scripts/
Warning: Some keg-only formulae are linked into the Cellar.
Linking a keg-only formula, such as gettext, into the cellar with
`brew link <formula>` will cause other formulae to detect them during
the `./configure` step. This may cause problems when compiling those
other formulae.
Binaries provided by keg-only formulae may override system binaries
with other strange results.
You may wish to `brew unlink` these brews:
php#7.1
php -v dumps
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/opt/php71-apcu/apcu.so' - dlopen(/usr/local/opt/php71-apcu/apcu.so, 9): image not found in Unknown on line 0
Warning: PHP Startup: Unable to load dynamic library '/usr/local/opt/php71-apcu/apcu.so' - dlopen(/usr/local/opt/php71-apcu/apcu.so, 9): image not found in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/opt/php71-gmp/gmp.so' - dlopen(/usr/local/opt/php71-gmp/gmp.so, 9): image not found in Unknown on line 0
Warning: PHP Startup: Unable to load dynamic library '/usr/local/opt/php71-gmp/gmp.so' - dlopen(/usr/local/opt/php71-gmp/gmp.so, 9): image not found in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/opt/php71-igbinary/igbinary.so' - dlopen(/usr/local/opt/php71-igbinary/igbinary.so, 9): image not found in Unknown on line 0
Warning: PHP Startup: Unable to load dynamic library '/usr/local/opt/php71-igbinary/igbinary.so' - dlopen(/usr/local/opt/php71-igbinary/igbinary.so, 9): image not found in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/opt/php71-imagick/imagick.so' - dlopen(/usr/local/opt/php71-imagick/imagick.so, 9): image not found in Unknown on line 0
Warning: PHP Startup: Unable to load dynamic library '/usr/local/opt/php71-imagick/imagick.so' - dlopen(/usr/local/opt/php71-imagick/imagick.so, 9): image not found in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/opt/php71-intl/intl.so' - dlopen(/usr/local/opt/php71-intl/intl.so, 9): image not found in Unknown on line 0
Warning: PHP Startup: Unable to load dynamic library '/usr/local/opt/php71-intl/intl.so' - dlopen(/usr/local/opt/php71-intl/intl.so, 9): image not found in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/opt/php71-mcrypt/mcrypt.so' - dlopen(/usr/local/opt/php71-mcrypt/mcrypt.so, 9): image not found in Unknown on line 0
Warning: PHP Startup: Unable to load dynamic library '/usr/local/opt/php71-mcrypt/mcrypt.so' - dlopen(/usr/local/opt/php71-mcrypt/mcrypt.so, 9): image not found in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/opt/php71-pdo-pgsql/pdo_pgsql.so' - dlopen(/usr/local/opt/php71-pdo-pgsql/pdo_pgsql.so, 9): image not found in Unknown on line 0
Warning: PHP Startup: Unable to load dynamic library '/usr/local/opt/php71-pdo-pgsql/pdo_pgsql.so' - dlopen(/usr/local/opt/php71-pdo-pgsql/pdo_pgsql.so, 9): image not found in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/opt/php71-redis/redis.so' - dlopen(/usr/local/opt/php71-redis/redis.so, 9): image not found in Unknown on line 0
Warning: PHP Startup: Unable to load dynamic library '/usr/local/opt/php71-redis/redis.so' - dlopen(/usr/local/opt/php71-redis/redis.so, 9): image not found in Unknown on line 0
PHP 7.1.15 (cli) (built: Mar 29 2018 09:21:29) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.1.0, Copyright (c) 1998-2018 Zend Technologies
with Zend OPcache v7.1.15, Copyright (c) 1999-2018, by Zend Technologies
**php -i |grep gmp dump **
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/opt/php71-apcu/apcu.so' - dlopen(/usr/local/opt/php71-apcu/apcu.so, 9): image not found in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/opt/php71-gmp/gmp.so' - dlopen(/usr/local/opt/php71-gmp/gmp.so, 9): image not found in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/opt/php71-imagick/imagick.so' - dlopen(/usr/local/opt/php71-imagick/imagick.so, 9): image not found in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/opt/php71-intl/intl.so' - dlopen(/usr/local/opt/php71-intl/intl.so, 9): image not found in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/opt/php71-mcrypt/mcrypt.so' - dlopen(/usr/local/opt/php71-mcrypt/mcrypt.so, 9): image not found in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/opt/php71-pdo-pgsql/pdo_pgsql.so' - dlopen(/usr/local/opt/php71-pdo-pgsql/pdo_pgsql.so, 9): image not found in Unknown on line 0
Warning: PHP Startup: Unable to load dynamic library '/usr/local/opt/php71-gmp/gmp.so' - dlopen(/usr/local/opt/php71-gmp/gmp.so, 9): image not found in Unknown on line 0
Configure Command => './configure' '--prefix=/usr/local/Cellar/php#7.1/7.1.15' '--localstatedir=/usr/local/var' '--sysconfdir=/usr/local/etc/php/7.1' '--with-config-file-path=/usr/local/etc/php/7.1' '--with-config-file-scan-dir=/usr/local/etc/php/7.1/conf.d' '--enable-bcmath' '--enable-calendar' '--enable-dba' '--enable-dtrace' '--enable-exif' '--enable-ftp' '--enable-fpm' '--enable-intl' '--enable-mbregex' '--enable-mbstring' '--enable-mysqlnd' '--enable-opcache-file' '--enable-pcntl' '--enable-phpdbg' '--enable-phpdbg-webhelper' '--enable-shmop' '--enable-soap' '--enable-sockets' '--enable-sysvmsg' '--enable-sysvsem' '--enable-sysvshm' '--enable-wddx' '--enable-zip' '--with-apxs2=/usr/local/opt/httpd/bin/apxs' '--with-bz2' '--with-fpm-user=_www' '--with-fpm-group=_www' '--with-freetype-dir=/usr/local/opt/freetype' '--with-gd' '--with-gettext=/usr/local/opt/gettext' '--with-gmp=/usr/local/opt/gmp' '--with-icu-dir=/usr/local/opt/icu4c' '--with-jpeg-dir=/usr/local/opt/jpeg' '--with-kerberos' '--with-layout=GNU' '--with-ldap' '--with-ldap-sasl' '--with-libedit' '--with-libzip' '--with-mcrypt=/usr/local/opt/mcrypt' '--with-mhash' '--with-mysql-sock=/tmp/mysql.sock' '--with-mysqli=mysqlnd' '--with-ndbm' '--with-openssl=/usr/local/opt/openssl' '--with-pdo-dblib=/usr/local/opt/freetds' '--with-pdo-mysql=mysqlnd' '--with-pdo-odbc=unixODBC,/usr/local/opt/unixodbc' '--with-pdo-pgsql=/usr/local/opt/libpq' '--with-pgsql=/usr/local/opt/libpq' '--with-pic' '--with-png-dir=/usr/local/opt/libpng' '--with-pspell=/usr/local/opt/aspell' '--with-unixODBC=/usr/local/opt/unixodbc' '--with-webp-dir=/usr/local/opt/webp' '--with-xmlrpc' '--with-xsl' '--with-zlib' '--with-curl'
/usr/local/etc/php/7.1/conf.d/ext-gmp.ini,
gmp
gmp support => enabled
P.S. I'm new on mac's
I had a similar issue but with different extensions.
The problem seemed to stem from older links being removed after I ran an upgrade. In my case this caused the stock version of PHP to be used. You can check this with the CLI command: which php.
which php
# If you see this it's the stock version
/usr/bin/php
#If you see this you are using the Homebrew version
/usr/local/bin/php
To fix it I reinstalled and relinked php using Homebrew:
# Reinstall PHP 7.1
brew reinstall php#7.1
# check carefully that overwriting links won't break things
brew link --overwrite --force --dry-run php#7.1
# Run it for real this time assuming you checked
brew link --overwrite --force php#7.1
# Double check that you are now using homebrew's PHP
which php
# This should identify any missing extensions
php -v
# Reinstall missing extensions. In my case:
brew reinstall php71-xdebug php71-imagick
# Check that php can find the extension.
php -v
That is what worked for me. I hope it helps you out.
Since php71 was moved from homebrew/php to homebrew/core (around 31st of March) it has been called php#7.1.
The neat thing is, most of all the php extension are already installed with php#7.1. So I checked and the gmp extension is also in the default package. So no need to install it manually (you cannot even do it), because it is already packed with the php#7.1 formula.
The pull request:
https://github.com/Homebrew/homebrew-php/pull/4798

DYLD error when starting up mongodb

I installed mongo with:
brew install mongodb
I created the data directory:
/data/dir
i included mongod the path (which mongod --> /opt/local/bin/mongod):
export PATH=$PATH:/opt/local/bin/mongod
I tried to run mongod:
mongod
And got this response:
dyld: lazy symbol binding failed: Symbol not found: __ZN7pcrecpp2RE4InitERKSsPKNS_10RE_OptionsE
Referenced from: /opt/local/bin/mongod
Expected in: /opt/local/lib/libpcrecpp.0.dylib
dyld: Symbol not found: __ZN7pcrecpp2RE4InitERKSsPKNS_10RE_OptionsE
Referenced from: /opt/local/bin/mongod
Expected in: /opt/local/lib/libpcrecpp.0.dylib
What is this error all about? How do I proceed?
the problem was that I had set the path to the wrong directory
Brew installs packages into /usr/local/bin which is where there resides a symlink mongod# -> homebrew's cellar
so, instead, I ran /usr/local/bin/mongod and then it started fine.

Resources