Blame INSTALL.md

Packit 3652a6
# Installing File-LibMagic
Packit 3652a6
Packit 3652a6
Installing File-LibMagic requires that you have the *libmagic.so* library and
Packit 3652a6
the *magic.h* header file installed. Once those are installed, this module is
Packit 3652a6
installed like any other Perl distributions.
Packit 3652a6
Packit 3652a6
## Installing libmagic
Packit 3652a6
Packit 3652a6
On Debian/Ubuntu run:
Packit 3652a6
Packit 3652a6
    sudo apt-get install libmagic-dev
Packit 3652a6
Packit 3652a6
On Mac you can use homebrew (http://brew.sh/):
Packit 3652a6
Packit 3652a6
    brew install libmagic
Packit 3652a6
Packit 3652a6
## Installation with cpanm
Packit 3652a6
Packit 3652a6
If you have cpanm, you only need one line:
Packit 3652a6
Packit 3652a6
    % cpanm File::LibMagic
Packit 3652a6
Packit 3652a6
If you are installing into a system-wide directory, you may need to pass the
Packit 3652a6
"-S" flag to cpanm, which uses sudo to install the module:
Packit 3652a6
Packit 3652a6
    % cpanm -S File::LibMagic
Packit 3652a6
Packit 3652a6
## Installing with the CPAN shell
Packit 3652a6
Packit 3652a6
Alternatively, if your CPAN shell is set up, you should just be able to do:
Packit 3652a6
Packit 3652a6
    % cpan File::LibMagic
Packit 3652a6
Packit 3652a6
## Manual installation
Packit 3652a6
Packit 3652a6
As a last resort, you can manually install it. Download the tarball, untar it,
Packit 3652a6
then build it:
Packit 3652a6
Packit 3652a6
    % perl Makefile.PL
Packit 3652a6
    % make && make test
Packit 3652a6
Packit 3652a6
Then install it:
Packit 3652a6
Packit 3652a6
    % make install
Packit 3652a6
Packit 3652a6
If you are installing into a system-wide directory, you may need to run:
Packit 3652a6
Packit 3652a6
    % sudo make install
Packit 3652a6
Packit 3652a6
## Specifying additional lib and include directories
Packit 3652a6
Packit 3652a6
On some systems, you may need to pass additional lib and include directories
Packit 3652a6
to the Makefile.PL. You can do this with the `--lib` and `--include`
Packit 3652a6
parameters:
Packit 3652a6
Packit 3652a6
    perl Makefile.PL --lib /usr/local/include --include /usr/local/include
Packit 3652a6
Packit 3652a6
You can pass these parameters multiple times to specify more than one
Packit 3652a6
location.
Packit 3652a6
Packit 3652a6
## Documentation
Packit 3652a6
Packit 3652a6
File-LibMagic documentation is available as POD.
Packit 3652a6
You can run perldoc from a shell to read the documentation:
Packit 3652a6
Packit 3652a6
    % perldoc File::LibMagic