Skip to content

Instantly share code, notes, and snippets.

@ashwinvis
Created June 29, 2017 16:32
Show Gist options
  • Save ashwinvis/a533c210d1ba788479a3724558e4d873 to your computer and use it in GitHub Desktop.
Save ashwinvis/a533c210d1ba788479a3724558e4d873 to your computer and use it in GitHub Desktop.
CPAN and GNU stow installation
#!/bin/bash
# Set up CPAN
# Append the following lines to .bashrc / .profile
# PERL_DIR=$HOME/.perl
# export PERL_LOCAL_LIB_ROOT=$PERL_DIR:${PERL_LOCAL_LIB_ROOT}
# export PATH=$PERL_DIR/bin:$PATH
# export PERL5LIB=$PERL_DIR/lib/perl5
# PERL_MB_OPT="--install_base \"${PERL_DIR}\""; export PERL_MB_OPT;
# PERL_MM_OPT="INSTALL_BASE=${PERL_DIR}"; export PERL_MM_OPT;
cpan
cpan App::cpanminus
cd /tmp
wget https://ftp.gnu.org/gnu/stow/stow-latest.tar.gz
tar xzf stow-latest.tar.gz
cd stow-2.2.2/
cpanm Test::Output
# eval `perl -V:siteprefix`
# echo $siteprefix
# ./configure --prefix=$siteprefix && make
# make clean
./configure --with-pmdir=`PERL5LIB= perl -le 'print $INC[0]'` && make
perl Build.PL
./Build install
which stow
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment