Why are all Linux commands broken after installing Perl?
The error on login is from the following line being in your bashrc script:
~/perl5/perlbrew/etc/bashrc
You can likely fix perl by deleting /usr/bin/perl
as the install script didn't put it in /usr/local/bin/perl
by default... not sure where the ln
command was inspired from. You may have to consult your distro to fix Perl, not sure.
The installation script for perlbrew is much longer than I'm willing to read through. If you're still having problems you're best bet is going to be wipe and restore from backup.
Perl was probably already installed, and who knows what that install script did to your environment to screw it up.
Two lessons here:
- Never install software using the above "pipe to bash" method without first verifying that 1) the install works, 2) it won't mess things up, and 3) it doesn't do anything malicious.
- Always, always, always check to see if a package is provided either by default or by your distro's default package repository before going to a third party.
You may be able to recover by fixing your ~/.bashrc
file to a known-good state, but honestly, I'd recommend re-installing your OS and trying again.