SitePoint Sponsor

User Tag List

Results 1 to 11 of 11

Thread: pear question

  1. #1
    SitePoint Wizard
    Join Date
    Oct 2005
    Location
    London
    Posts
    1,678
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    pear question

    HI,

    I have a mac and im trying to install a pear package for the first time. I understand that the package manager is already installed with php on a mac and that i should be able to
    install a package by doing the following:

    "If you have downloaded a package release from http://pear.php.net/ as a gzipped tar archive, you can also install it locally. To do this, run the following line on your shell:
    $ pear install <file>.tgz"

    My question is where do i put the downloaded file on my computer for install command to find?

    Any ideas?

  2. #2
    SitePoint Zealot musher's Avatar
    Join Date
    Nov 2005
    Location
    Hull, England
    Posts
    161
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Put it in a folder anywhere and then run that command from that folder I believe.

  3. #3
    SitePoint Wizard
    Join Date
    Oct 2005
    Location
    London
    Posts
    1,678
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    hi,

    how do i run a commmand from a particluar folder? Sorry im a terminal virgin!

  4. #4
    SitePoint Zealot musher's Avatar
    Join Date
    Nov 2005
    Location
    Hull, England
    Posts
    161
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I'm not familiar with Macs, but I'm sure they're *nix based somewhere deep down.

    try
    Code:
    cd /path/to/my/folder
    pear install pear_package.tar.gz

  5. #5
    SitePoint Addict
    Join Date
    Mar 2005
    Posts
    251
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    you'll need to do:

    sudo pear install package.tar.gz

    and pop an admin password in when requested.

    If you open a terminal window you can type cd at the command line and then drag the folder and drop it on the terminal window, then press return and type the line above.

  6. #6
    SitePoint Wizard
    Join Date
    Oct 2005
    Location
    London
    Posts
    1,678
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    great guys that sounds pretty straightfoward. I'll give that a go tonight

  7. #7
    SitePoint Wizard
    Join Date
    Oct 2005
    Location
    London
    Posts
    1,678
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    hi guys,

    Right i did what you said. I pointed my terminal to the correct folder and put the command in, like so:

    james-filtness-powerbook59:~ jamesfiltness$ cd /users/james/desktop/pear;
    james-filtness-powerbook59:/users/james/desktop/pear james$ pear install HTML_Template_IT-1.2.1.tgz;

    but i got this:

    Warning: touch(): Unable to create file /usr/lib/php/.lock because Permission denied in Registry.php on line 284
    could not create lock file: failed to open stream: No such file or directory
    james-filtness-powerbook59:/users/jamesfiltness/desktop/pear jamesfiltness$


    Now i dont know why. I dont even know for sure if ive got the package manager installed and am not too sure how to find that out. I have read at the pear manual here:

    http://pear.php.net/manual/en/installation.getting.php

    that if you've set up PHP yourself as i have done then the package manager should be there.

    Any ideas?

  8. #8
    SitePoint Wizard
    Join Date
    Oct 2005
    Location
    London
    Posts
    1,678
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    aha,

    Ive logged in as the root user and checked that pear is installed by doing pear list. I get a list of all the pear packages installed ( one of which is what i need!)
    Ive tried installing the other ones i need by doing:

    sudo pear install MDB2-2.3.0.tgz

    and putting the root password in. I get this though:

    xml_rpc_client: connection ti the RPC server pear.php.net:80 failed. invalid argument.

    ive also tried putting in the path to the folder that the package is in and then doing the sudo pear line and i get :

    no handlers for package.xml version 2.0



    any idea on what it is? I do not have connectio to the internet on my mac and the above line suggests its trying to connect to the internet. I have the pear package sitting in a folder in my desktop

    any ideas?

  9. #9
    SitePoint Addict
    Join Date
    Mar 2005
    Posts
    251
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    try running "sudo pear upgrade pear"
    first, it looks like you've got an old version of the pear packager.

  10. #10
    SitePoint Addict
    Join Date
    Mar 2005
    Posts
    251
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    ah! which you won't be able to do if you have no net connection.....
    It looks also as if you have other missing dependencies, which you're gonna need to download.

  11. #11
    SitePoint Wizard
    Join Date
    Oct 2005
    Location
    London
    Posts
    1,678
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    hi,

    right yeah looks like im going to have to get my mac connected to the net. Ive read that elsewhere also.

    thanks


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •