12.12.2020»»суббота

Install Pecl On Mac

12.12.2020
Install Pecl On Mac 3,2/5 9451 reviews

Download adobe cs5 master collection keygen for mac. Question or issue on macOS: I wanted to install amqp with pecl for my mac sierra. I installed php with brew, with pecl install amqp I receive an error: checking for amqp using pkg-config configure: error: librabbitmq not found. Install PECL extensions with Homebrewed PHP on Mac OS X Mountain Lion I needed to use the HTTPRequest class that comes as a PECL extension to PHP. This was easier than I thought.

1、 Background

Install Pecl On Mac 10.13

Some time ago, the MAC system was reloaded, and some extensions of PHP were lost. Yesterday, I needed to debug a project developed by swote. I found that PHP in the command line was brought by the system. If you install the extension, it is very inconvenient. You need to manually download the source code of swoole, then compile the source code of swoole and configure it by yourself. The whole process is very cumbersome;

I remember that it is very convenient to install swoole by using the PHP installed with brew and then using PECL. So I unloaded the PHP I brought with, and then used brew to install again, and installed PECL. After installing the swoole extension through PECL, I recorded the installation process for the next time

2、 Operation summary

  1. Uninstall your own software
  2. Re install software
  3. Verify the swote extension

3、 Uninstall your own software

Previously, when the MAC system was upgraded to 10.15 Catalina, I found that when I uninstalled PHP, I was promptedRead-only file systemI found a solution on the Internet. It needs to shut down the systemsipBefore you can delete some files, execute the following command

After the command is executed, the returned information is shown in the figure below

In the figure above, we can see that the command has been executed successfully. Then we can delete the PHP. First, we need to find out the location of the PHP. Check the PHP location command as shown below

After the command is executed, the returned information is shown in the figure below
In the above figure, you can see that a PHP path is returned. We can delete it. The command to delete the PHP is shown below

After the command is executed, the returned information is shown in the figure below
You can see it in the picture abovermThe command does not prompt an exception, indicating that the removal of PHP has been successful.

In order to prevent us from using brew to install the old version of PHP, we also try to uninstall the version of PHP installed by brew. The command to uninstall the old version of PHP installed by brew is shown below

This step is not necessary, but in order to prevent unexpected problems during the installation process, you can uninstall it if you can. You can also jump to the PECL installation step without uninstalling

After the command is executed, the returned information is shown in the figure below
As you can see in the figure above, you have successfully uninstalled the version of PHP that brew installed

4、 Re install

Pecl

We use the brew command to install the new version of PHP. Brew itself needs to be installed, but I believe you have already installed it. The command to install PHP with brew is shown below

After the command is executed, the returned information is shown in the figure below https://ameblo.jp/jedringtatel1972/entry-12632358726.html.

In the figure above, we can see that the installed version of PHP is 7.3, and the installation location of PHP is also shown, indicating that we have successfully installed.

Next, we need to install PECL. First, we need to download the PECL installation package from PHP’s official website, and execute the command as shown below

After the command is executed, the returned information is shown in the figure below

In the above figure, you can see that the installation package has been downloaded. Next, we can use PHP to execute the installation package. The execution command is as follows

After the command is executed, the returned information is shown in the figure below

In the figure above, we can see that PECL has been installed. Now we can use PECL to install the tool. The execution command is as follows

This command will have a compilation process, and the execution time is a little long. After the command is executed, the returned information is shown in the figure below

In the above figure, you can see that the implementation has been successful, and the droole extension is automatically installed into the PHP extension directory and added to the configuration file.

Install Pecl On Mac High Sierra

5、 Verify the swote extension

After the installation of droole is completed, we can verify the availability of the installation in the following two ways. First, check the extension module command of PHP installation to see whether the droole is displayed. The execution command is shown as follows

After the command is executed, the returned information is shown in the figure below

In the above figure, you can see that the swoole module is installed in PHP. Then we will find a project that depends on the swoole. I have a project developed with laravel. Once we come to the swote, the startup command is as follows

After the command is executed, the returned information is shown in the figure below

In the figure above, you can see the version information of PHP and spool, which shows that the whole installation process has been completed

6、 Book recommendation

If you are more interested in the author’s practical articles, you can pay attention to the author’s Publishing House “PHP web security development practice”, which has been sold on various platforms. The cover is shown in the figure below

Author: Tang Qingsong

Wechat: songboy8888

Date: December 3, 2019

Question or issue on macOS:

So it looks like the new ‘System Integrity Protection’ lockdown of /usr (among other directories) makes pear and pecl a non-starter. Has anyone found a workaround short of disabling it?

How to solve this problem?

Solution no. 1:

There’s a much easier way — no need to disable SIP or download your own copy:

Solution no. 2:

You shouldn’t install binaries into system /usr, use /usr/local instead.

The pecl and pear commands should come along with PHP when installing via Homebrew.

Here is the example installing PHP with the latest Homebrew:

or the specific version:

To find your pecl and pear commands, run:

or:

If you don’t have it, consider uninstalling previous PHP version or run reinstall instead.

You can also try to relink it by: /dexter-axle-serial-number-lookup.html.

Otherwise, link it manually:

Alternatively download Pear it directly as a Phar package:

or with this following one-liner (will work on Linux, but not on Unix):

Solution no. 3:

From this link: http://jason.pureconcepts.net/2012/10/install-pear-pecl-mac-os-x/ With this instructions, you don’t need to disable ‘System Integrity Protection’


The following instructions install PEAR and PECL on Mac OS X under
/usr/local/. PECL is bundled with PEAR. So this is as simple as
installing PEAR on Mac OS X.
PEAR is PHP’s Package Repository and makes it easy to download and
install PHP tools like PHPUnit and XDebug. I specifically recommend
these two for every PHP developer.
Download PEAR
curl -O https://pear.php.net/go-pear.phar
sudo php -d detect_unicode=0 go-pear.phar

Configure and Install PEAR
You should now be at a prompt to configure PEAR.

Type 1 and press return.
Enter:
/usr/local/pear

Install Pecl Macos Catalina

Type 4 and press return.
Enter:
/usr/local/bin

Press return

Verify PEAR.
You should be able to type:
pear version

Eventually, if you use any extensions or applications from PEAR, you
may need to update PHP’s include path.

Solution no. 4:

On Mohave I had to run the following commands – thanks go to https://tobschall.de/2018/08/07/pear-on-mojave/

Solution no. 5:

Add suffix --with-pear to install pear and pecl
See example below

Solution no. 6:

This worked for me as of MacOS Sierra 10.12.1 for upgrading PHP, installing PEAR and V8

Install Pecl On Mac Download

Solution no. 7:

High Sierra setup:

  • install Brew
  • install PHP with Brew

There is preinstalled PEAR PACKAGE in

from there you can run

and you should have working PHP binary with Xdebug.

Solution no. 8:

When brew is used and not linked, use:

Solution no. 9:

For macOS Mojave 10.14.4 just use /local instead of /usr when asked for “Installation base ($prefix)” location.

Hope this helps!