Archive

Posts Tagged ‘install’

Install New PEAR Packages From The Linux CLI

January 24th, 2009

I previously wrote about how to Enable Pear Packages when using Plesk, here’s how to do it when you run your own LAMP stack.

First up, see if the PEAR management tool is already installed (the  command pear should be available).

mattias-laptop ~ # pear
The program ‘pear’ is currently not installed.  You can install it by typing:
apt-get install php-pear

If it’s not, simply install the package by issueing the command suggested.

mattias-laptop ~ # apt-get install php-pear
Reading package lists… Done
Building dependency tree
Reading state information… Done
….
Setting up php-pear (5.2.6-2ubuntu4) …

After installation of the management tool is completed, you can quickly install new PEAR packages like this.

pear install PackageName

A useful hint is that the Pear Packages which are missing, can be easily installed by typing in the full packagename. Here’s an example.

mattias-laptop # php -q test.php
Warning: require_once(Console/Getargs.php): failed to open stream: No such file or directory in /var/www/test/test.php on line 36

Fatal error: require_once(): Failed opening required ‘Console/Getargs.php’ (include_path=’.:/usr/share/php:/usr/share/pear’) in /var/www/test/test.php on line 36

The missing PEAR package “Console/Getargs.php” can be installed like this.

pear install Console_Getargs

Just replace each folder within the PEAR class by an underscore, leave out the “.php” extension, and you can install any PEAR package you want. That’s good news, because there are a lot of very useful PEAR packages around!

Matti PHP , ,

Making The Switch To Linux – Keep In Mind … (10 Ubuntu Tips)

October 16th, 2008

I’ve moved my desktop at home from a Windows XP to a Ubuntu Hardy Heron (8.04 – and soon the new Intrepid Ibex), and have had to google a bit to find the answers to my following “problems”.

Here are some of the issues I experienced, and some possible solutions (and as usual, there are several different solutions to each problem).

This list will get an update as soon as Ubuntu 8.10 goes live (which should be in a couple of days) – perhaps they even fixed a few of these little things. :-) Read more…

Matti linux , , , ,