Install Gdb For Mac Sierra

  1. Install Gdb For Mac Sierra
  2. Install Gdb For Mac Sierra Free

Question or issue on macOS:

I’m using PHP 7.2 on OS X El Capitan, installed using Homebrew (of course). Now I’d like to use some IMAP functions from PHP’s IMAP extension, but no matter what I search for, I can’t find a way to add the extension on OSX.

Some things I’ve tried… I have, of course, tried the most commonly recommended approach:

Yet this fails, returning:

MacOS Package (.pkg) Installer. The easiest way to install MacPorts on a Mac is by downloading the pkg or dmg for Big Sur, Catalina, Mojave, High Sierra, Sierra, El Capitan, Yosemite, Mavericks, Mountain Lion, Lion, Snow Leopard, Leopard or Tiger and running the system's Installer by double-clicking on the pkg contained therein, following the on-screen instructions until completion. Installing GDB As with GCC, the easiest way to install GDB is through Homebrew. I get gdb by brew install gdb. Codesign gdb 8.0.1 in high Sierra. It adds handling for recognizing executables on Mac. I got errors for variable. $ cd gdb-7.11 gdb-7.11$./configure gdb-7.11$ make This step will take a bit of time. So you can sit back and have cup of coffee for a while. Once it is completed, you can locate gdb binary located at gdb-7.11/gdb/gdb. Step-4: Install GDB. $ make install By default this will install gdb binaries in /usr/local/bin and libs in /usr/local/lib.

Another method, which I found mentioned in passing, also fails:

I’m not exactly sure which direction to go in with this. I’m sure there’s an easy, probably documented, way of doing this, but I am yet to find it. Perhaps I’m just looking in the wrong places and using the wrong search terms…

How to solve this problem?

Install Gdb For Mac Sierra

Solution no. 1:

Kevin Abel is providing some of the PHP extensions removed from Homebrew/core. You can install the IMAP extension with:

To install a specific version, such as 7.2 use:

Solution no. 2:

Here is how I solved this problem under Mojave:

First, I installed IMAP module for PHP 7.2

Secondly I copied the imap.so from installed folder to the ‘extension_dir’ used by php.ini

Install Gdb For Mac Sierra

Solution no. 3:

This answer for those who prefer installing imap ext using native commands without adding other taps or smth else.

In short we need to compile extension from sources.
Ok, here is the process.

That’s it. Be lucky!

Solution no. 4:

For those who have trouble in Mojave, I have forked the repository and fixed it use:
brew tap vishal-sancheti/php-ext instead

For

Hope this helps!

Here are the steps to installing and setting up GDB on Mac OS Sierra/High Sierra.Run brew install gdb.On starting gdb, you will get the following error:

To fix this error, follow the following steps:

  1. Open Keychain Access
  2. In menu, open Keychain Access > Certificate Assistant > Create a Certificate
  3. Give it a name (e.g. gdbcert)
Install gdb for mac sierra update
  • Identity type: Self Signed Root
  • Certificate type: Code Signing
  • Check: Let Me Override Defaults

Install Gdb For Mac Sierra Free

  1. Continue until 'Specify a Location For'
  2. Set Keychain location to System. If this yields the following error:Certificate Error: Unknown Error =-2,147,414,007Set Location to Login, Unlock System by click on the lock at the top left corner and drag and drop the certificate gdbcert to the System Keychain.
  3. Create certificate and close Certificate Assistant.
  4. Find the certificate in System keychain.
  5. Double click certificate.
  6. Expand Trust, set Code signing to Always Trust
  7. Restart taskgated in terminal: killall taskgated
  8. Enable root account by following the steps given below:Open System Preferences.Go to User & Groups > Unlock.Login Options > 'Join' (next to Network Account Server).Click 'Open Directory Utility'.Go up to Edit > Enable Root User.
  9. Codesign gdb using your certificate: codesign -fs gdbc /usr/local/bin/gdb
  10. Shut down your mac and restart in recovery mode (hold down command-R until apple logo appears)
  11. Open terminal window
  12. Modify System Integrity Protection to allow debugging: csrutil enable --without debug
  13. Reboot your Mac. Debugging with gdb should now work as expected.