Monday, October 8, 2007

Manual installation of perl_upload

These are the instructions for manually installing perl_upload. Using CPAN is much simpler and is recommended instead.

Step 1: Installing flickr_upload prerequisites


(Note: You may skip this section and go directly to "Step 2: Installing flickr_upload", below. If you run into prerequisite problems, you may return to this section then).

The flickr_upload package has a few dependencies which may not be fulfilled by default on your Perl installation. This includes Flickr::API and XML::Parser::Lite::Tree, which in turn depends on SOAP::Lite.

In Ubuntu Gutsy, you can install these modules by using the following command:
$ sudo apt-get install libxml-parser-lite-tree-perl libflickr-api-perl


If your distro does not provide these packages (as is the case, for instance, in Ubuntu Feisty), you'll have to install them manually. Follow these instructions:
  • Download the SOAP-Lite Perl module, which includes the XML::Parser::Lite class. As of this writing, the current version is SOAP-Lite-0.69.

  • Open a terminal and go wherever the file was saved. Uncompress the file you just downloaded and generate the Makefile by using the following commands:
    $ tar xvzf SOAP-Lite-0.69.tar.gz
    $ cd SOAP-Lite-0.69
    $ perl Makefile.PL


    You'll be asked for some configuration options. Just press Enter three times to accept the default values. Then use these two commands to install the module:
    $ make
    $ sudo make install

    You will need to do the installation (the very last step) as root. I used sudo, because I'm using Ubuntu; you might need to use su instead.


  • Next in line is XML::Parser::Lite::Tree, which depends on XML::Parser::Lite (which is in turn provided by SOAP-Lite, which we just installed). Download the file (the current version as of this writing is XML-Parser-Lite-Tree-0.03.tar.gz), open a terminal, go to wherever the file was downloaded and run the following commands:
    $ tar xvzf XML-Parser-Lite-Tree-0.03.tar.gz
    $ cd XML-Parser-Lite-Tree-0.03
    $ perl Makefile.PL
    $ make
    $ sudo make install


  • Finally, for Flickr::API, the procedure is exactly the same. The current version as of this writing is Flickr-API-0.08.
    $ tar xvzf Flickr-API-0.08.tar.gz
    $ cd Flickr-API-0.08
    $ perl Makefile.PL
    $ make
    $ sudo make install

That's it. Once you are done with the installation, you may remove the directories that were within the compressed files to save space.

Step 2: Installing flickr_upload


  • Save the Flickr-Upload-1.29.tar.gz file somewhere. Open a terminal, go to the directory where the file is located, and follow the instructions below:

    $ tar xvzf Flickr-Upload-1.29.tar.gz
    $ cd Flickr-Upload-1.29
    $ perl Makefile.PL

    At this point, Perl may complain that some prerequisites are not met:
    cepe@Imago:~/Flickr-Upload-1.29$ perl Makefile.PL
    Checking if your kit is complete...
    Looks good
    Warning: prerequisite Flickr::API 0.07 not found.
    Warning: prerequisite XML::Parser::Lite::Tree 0.03 not found.

    Writing Makefile for Flickr::Upload

    If that's the case, you need to follow the steps outlined in Section 1 before returning here. You have been warned ;) If not, continue reading.

  • Make and install flickr_upload by running the following commands (stilll within the Flickr-Upload-1.29 directory):
    $ make
    $ sudo make install

    You will need to do the installation (the very last step) as root. I used sudo, because I'm using Ubuntu; you might need to use su instead.


You may now continue with the instructions for FlickrSave installation.

No comments: