简体   繁体   English

安装用于灯泡的xdebug

[英]Install xdebug for lamp

I have big troubles installing xdebug and get it working with my lamp installation. 我在安装xdebug并使其与我的灯泡安装一起工作时遇到了很大的麻烦。 I'm on an ubuntu system and i installed xdebug via sudo apt-get install php-xdebug . 我在ubuntu系统上,我通过sudo apt-get install php-xdebug

I also have a standalone php binary, for which xdebug automatically installed fine. 我也有一个独立的php二进制文件,可以自动为它自动安装xdebug。 I located the xdebug.so and added the zend_extension=path/to/xdebug.so in my lamp/etc/php.ini . 我找到了xdebug.so,并在lamp/etc/php.ini添加了zend_extension=path/to/xdebug.so However i got an error 但是我有一个错误

wrong ELF class: ELFCLASS64

which probably means that my lamp runs in differnt bit mode than my standalone php. 这可能意味着我的灯比独立的php以不同的位模式运行。

However i went to xdebug.com and downloaded the source. 但是我去了xdebug.com并下载了源代码。 Followed the steps mentioned in the manual installation: 遵循手动安装中提到的步骤:

/opt/lamp/bin/phpize
./configure --enable-xdebug --with-php-config=/opt/lampp/bin/php-config
make

(The first time phpize complained about missing autoconf so i also to install autoconf sudo apt-get install autoconf ). (第一次phpize抱怨缺少autoconf,所以我也要安装autoconf sudo apt-get install autoconf )。

Then again when running make i ran into the follwing error 然后再次运行时make我遇到以下错误

fatal error: php.h: file or directory not found

Also phpize had some warnings and also didn't print any API numbers which is probably related. phpize也有一些警告,也没有打印任何可能相关的API编号。

grep: [path]/php.h: Datei oder Verzeichnis nicht gefunden
grep: [path]/Zend/zend_modules.h: Datei oder Verzeichnis nicht gefunden
grep: [path]/Zend/zend_extensions.h: Datei oder Verzeichnis nicht gefunden
Configuring for:
PHP Api Version:        
Zend Module Api No:     
Zend Extension Api No:  
configure.in:3: warning: prefer named diversions
configure.in:3: warning: prefer named diversions

Anyway, so xdebug didn't work with lamp out of the box and i couldn't compile it from the sources either. 无论如何,所以xdebug不能与开箱即用的灯一起工作,我也无法从源代码编译它。

I hope somebody has suggestions what i could try next. 我希望有人提出建议,我下一步可以尝试。

Go to http://sourceforge.net/projects/xampp/files/XAMPP%20Linux/ and install the devel version of xampp. 转到http://sourceforge.net/projects/xampp/files/XAMPP%20Linux/并安装xampp的devel版本。

Without the development version you won't be able to compile any packages simply because the regular version does not contain the necessary sources. 没有开发版本,您将无法编译任何软件包,因为常规版本不包含必要的源代码。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM