Hello,

as one of the forum members susgested - I need to learn PECL to use.

So I tried today, but not succesfully.

I tried installing random extention, I choose html_parse http://pecl.php.net/package/html_parse\

So as documentattin writes - I run:

pecl install html_parse

in the ubuntu command line. And get error instantly:

 Warning: lstat(): Lstat failed for /tmp/pear/cache/741d4ebd14ce5988d05f7b5bc85f2e0arest.cacheid in PEAR/REST.php on line 276

Warning: lstat(): Lstat failed for /tmp/pear/cache/741d4ebd14ce5988d05f7b5bc85f2e0arest.cacheid in /usr/share/php/PEAR/REST.php on line 276
No releases available for package "pecl.php.net/html_parse"
install failed

So I tried to do a google serch, but did not find exacly what I need to fix those errors.

So could someone explain those errors and point me at some direction?

Recommended Answers

All 4 Replies

It seems there's a bug related to your problem, for more information check:

Is this happening only with html_parse package?

Anyway try by adding sudo:

sudo pecl install html_parse

Otherwise write the specific package version:

sudo pecl install channel://pecl.php.net/html_parse-1.0.0

And if it doesn't work, download it and run pecl with the local file:

wget http://pecl.php.net/get/html_parse-1.0.0.tgz
sudo pecl install ./html_parse-1.0.0.tgz

If still you have problems you can compile it. Since html_parse depends from ekhtml you have to install it:

wget http://sourceforge.net/projects/ekhtml/files/latest/download
tar xvf download
cd ekhtml-0.3.2
./configure
make
sudo make install

And then do the same with html_parse:

tar xvf html_parse-1.0.0.tgz
cd html_parse-1.0.0
phpize
./configure
make
sudo make install

And it should work.

thank you very much :) I have no idea how I would solve myself this without help :) But really there is saying its better to learn to fishing, than give a fish, at least in our country. So you gave me a fish. But I did not learn how to create those steps by thinking.

But anyway, its still good, and I doubt that I will need this often, so I will just check this when I need.

Answering your questions:

Is this happening only with html_parse package?

no, same with tidy package.

By adding sudo it started showign something different, but still error:

darius@dc17ljr2e:~$ sudo pecl install html_parse                            

    downloading html_parse-1.0.0.tgz ...
Starting to download html_parse-1.0.0.tgz (7,799 bytes)
.....done: 7,799 bytes
5 source files, building
running: phpize
Configuring for:
PHP Api Version:         20090626
Zend Module Api No:      20090626
Zend Extension Api No:   220090626
ekhtml installation directory? [autodetect] :
building in /tmp/pear/temp/pear-build-rootos7XKA/html_parse-1.0.0
running: /tmp/pear/temp/html_parse/configure --with-ekhtml
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for a sed that does not truncate output... /bin/sed
checking for cc... cc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether cc accepts -g... yes
checking for cc option to accept ISO C89... none needed
checking how to run the C preprocessor... cc -E
checking for icc... no
checking for suncc... no
checking whether cc understands -c and -o together... yes
checking for system library directory... lib
checking if compiler supports -R... no
checking if compiler supports -Wl,-rpath,... yes
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
checking for PHP prefix... /usr
checking for PHP includes... -I/usr/include/php5 -I/usr/include/php5/main 

-I/usr/include/php5/TSRM -I/usr/include/php5/Zend -I/usr/include/php5/ext 

-I/usr/include/php5/ext/date/lib
checking for PHP extension directory... /usr/lib/php5/20090626
checking for PHP installed headers prefix... /usr/include/php5
checking if debug is enabled... no
checking if zts is enabled... no
checking for re2c... no
configure: WARNING: You will need re2c 0.13.4 or later if you want to 

regenerate PHP parsers.
checking for gawk... gawk
checking whether to enable html_parse functions... yes, shared
checking whether ekhtml is available... yes, shared
checking for ekhtml in default path... configure: error: not found
ERROR: `/tmp/pear/temp/html_parse/configure --with-ekhtml' failed

same with
sudo pecl install channel://pecl.php.net/html_parse-1.0.0

and same with downloading local file.

After I did

wget http://sourceforge.net/projects/ekhtml/files/latest/download
tar xvf download
cd ekhtml-0.3.2
./configure
make
sudo make install

then I did not need even to compile html_parse, tried again

sudo pecl install html_parse

and it worked :)

Btw no I want to clean up, not to leave trash. So I uninstalled html_parse. But I need to uninstall ekhtml. But it is not pecl package as I understood, at least I dont see it when type:

/usr/bin/pecl list

so how can I uninstall ekhtml?

You don't find ekhtml inside pecl because it isn't a PHP extension.

In order to remove it run sudo make uninstall in the source directory of ekhtml. If you deleted that, download it again and compile it with the same parameters and then run the uninstall command. That should remove everything related to ekhtml. By the way: to get more information about parameters run ./configure --help (for parameters strictly related to the program to compile) and make --help to get more information about the compiling process.

But I did not learn how to create those steps by thinking.

Sorry for that, sometimes I just write too much.. :D

Sorry for that, sometimes I just write too much.. :D
everything is fine :) I will learn later if I will need :)

hmm so removing takes too much steps. Not optimal. Why nobody creates uninstall program like in windows :) even if it is from command line.

worked fine, thank you

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.