in reply to How to make symlink to new upgraded Perl?

Uh oh, it turns out I'm trying to use the 'ln $HOME/perl5/perlbrew/perls/perl-5.20.1/bin/perl /usr/bin/perl' and getting a "Invalid cross-device link" because my $HOME and /usr/bin are on different devices. Any advice to fix this?

Use a soft link for cross-device linking instead of a hard link (which is a technical impossibility in that case). ie:

rm /usr/bin/perl; ln -s $HOME/perl5/perlbrew/perls/perl-5.20.1/bin/perl /usr/bin/perl

Note that this only "solves" the problem quoted. The usual caveats raised in the other replies still stand.

Replies are listed 'Best First'.
Re^2: How to make symlink to new upgraded Perl?
by ikegami (Patriarch) on Jun 15, 2015 at 14:05 UTC
    Again, don't replace the system Perl!!!!
    ln -s $HOME/perl5/perlbrew/perls/perl-5.20.1/bin/perl \ /usr/bin/perl-stable
Re^2: How to make symlink to new upgraded Perl?
by marto (Cardinal) on Jun 15, 2015 at 14:10 UTC
    rm /usr/bin/perl ...

    This creates more problems, and doesn't solve any.