处理PHP 7.4装置xdebug呈现configure: error: rtnetlink.h is required, please...
在PHP 7.4中装置xdebug,呈现"configure: error: rtnetlink.h is required, please make sure it is available by installing the correct package"的问题。
在运用sudo yum install kernel-devel 装置完内核devel后仍是报错。
之后发现要装置的是xdebug 3.3 的版别,可是xdebug 从3.2开端就现已不支持php 7.4了,尽管不知道是不是这个原因导致的,可是切换到3.1之后就能够正常装置了。
This is the first release of Xdebug 3.2. This release adds support for PHP 8.2, and drops support for PHP 7.2 through PHP 7.4.
附:https://xdebug.org/announcements
一起顺便相关php.ini文件以备查询:
zend_extension=/usr/local/php7.4/lib/php/extensions/no-debug-non-zts-20190902/xdebug.so
[xdebug]
xdebug.mode=debug,develop
xdebug.discover_client_host =true
xdebug.idekey="PHPSTORM"
;remote_host和remote_enable还有remote_port 现已变为 client_host client_port
xdebug.remote_host="192.168.182.1"
xdebug.remote_enable=1
;xdebug.remote_port =9003
;xdebug.remote_log =/tmp/xdebug.txt
;上面的remote选项现已失效,运用client
xdebug.client_host="192.168.182.1"
xdebug.clent_port=9003
xdebug.default_enable=0
xdebug.profiler_enable=0
xdebug.auto_trace=0
xdebug.coverage_enable=0
xdebug.remote_autostart=0
之前一直在运用php 5x的版别装置和运用xdebug 2 ,在xdebug3中,有了开关 xdebug.mode=debug,develop ,默以为develop,不支持step,需求设置这个开关,
一起有一个 开关discover_client_host 需求留意,官方描绘为:If enabled, Xdebug will first try to connect to the client that made the HTTP request. It checks the $_SERVER['HTTP_X_FORWARDED_FOR'] and $_SERVER['REMOTE_ADDR'] variables to find out which hostname or IP address to use.也就是说敞开开关后能够主动测验衔接到建议恳求的客户端,而client_host 装备则为回退选项,也就是说假如无法衔接则运用client_host的装备