Home PHP Framework Swoole What should I do if swoole cannot be installed under win?

What should I do if swoole cannot be installed under win?

Apr 09, 2020 am 10:28 AM
swoole

What should I do if swoole cannot be installed under win?

swoole What should I do if I can’t install it under win?

The server uses a Linux environment, so you only need to read the documentation for the installation process of swoole.

Since the coding environment is on Windows, swoole needs to be installed on Windows. for testing purposes.

Okay, without further ado, let’s look at the official website document solution.

swoole's official website document writes:

CygWin environment support (Windows system)

swoole-1.7.7 adds support for the cygwin environment. In Windows environment, you can directly use cygwin php to run the swoole program.

Install cygwin and install the four packages gcc, make, autoconf, and php

Download the swoole source code and perform phpize/configure/make/make install

## in cygwin-shell #Modify php.ini and add swoole.so

In cygwin mode, PHP needs to be simplified and unused extensions removed to avoid the process occupying too much memory and causing the Fork operation to fail

According to the tutorial , I installed cygwin64.

Then use the command to install swoole, and the same problem occurs as in Linux

1

fatal error: pcre.h: No such file or directory

Copy after login

Since cygwin is used, I can only download the installation package myself,

1

https://sourceforge.net/projects/pcre/files/

Copy after login

In order To be sure, I downloaded pcre2-10.22 and pcre-8 and extracted them to cygwin/etc

Then run cygwin to run them in two folders respectively

1

2

./configure

make install

Copy after login

Okay, pcre has been installed .

The next step is to install swoole.

1

pecl install swoole

Copy after login

Add

1

extension=swoole.so

Copy after login

Run command in php.ini

1

php -m

Copy after login

Da Da~~

Done.

What should I do if swoole cannot be installed under win?

-------------------However, this is a dividing line---------- ------

However, it is of no use. It turns out that cygwin is a Linux emulator under Windows, which means that swoole can only run in this emulator, so just use Linux

The above is the detailed content of What should I do if swoole cannot be installed under win?. For more information, please follow other related articles on the PHP Chinese website!

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot Article Tags

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Which one is better, swoole or workerman? Which one is better, swoole or workerman? Apr 09, 2024 pm 07:00 PM

Which one is better, swoole or workerman?

How to use Swoole to implement a high-performance HTTP reverse proxy server How to use Swoole to implement a high-performance HTTP reverse proxy server Nov 07, 2023 am 08:18 AM

How to use Swoole to implement a high-performance HTTP reverse proxy server

How does swoole_process allow users to switch? How does swoole_process allow users to switch? Apr 09, 2024 pm 06:21 PM

How does swoole_process allow users to switch?

How to use swoole coroutine in laravel How to use swoole coroutine in laravel Apr 09, 2024 pm 06:48 PM

How to use swoole coroutine in laravel

How to restart the service in swoole framework How to restart the service in swoole framework Apr 09, 2024 pm 06:15 PM

How to restart the service in swoole framework

Which one has better performance, swoole or java? Which one has better performance, swoole or java? Apr 09, 2024 pm 07:03 PM

Which one has better performance, swoole or java?

Swoole Advanced: How to Optimize Server CPU Utilization Swoole Advanced: How to Optimize Server CPU Utilization Nov 07, 2023 pm 12:27 PM

Swoole Advanced: How to Optimize Server CPU Utilization

Swoole in action: How to use coroutines for concurrent task processing Swoole in action: How to use coroutines for concurrent task processing Nov 07, 2023 pm 02:55 PM

Swoole in action: How to use coroutines for concurrent task processing

See all articles