Jun
4
Crypt::HSXKPasswd on MacOS (File::HomeDir workaround)
Filed Under Computers & Tech, My Projects on June 4, 2019 at 5:38 pm
Due to a problem with the File::HomeDir
Perl module on recent versions of MacOS, the usual one-step instructions for installing Crypt::HSXKPasswd
from CPAN don’t work on Macs ATM (June 2019).
TL;DR
sudo cpan -f -I File::HomeDir sudo cpan Crypt::HSXKPasswd
The hsxkpasswd
terminal command that ships with Crypt::HSXKPasswd
uses the File::HomeDir
module to locate .hsxkpasswdrc
files. The aspects of this module used by Crypt::HSXKPasswd
appear to still work, but the module fails some tests while installing, so a force-install is needed.
Because Crypt::HSXKPasswd
specifies File::HomeDir
as a dependency, and because File::HomeDir
fails tests on MacOS ATM, installing the module as part of the installation of Crypt::HSXKPasswd
will cause the installation of Crypt::HSXKPasswd
to fail.
The easiest way to get around these problems is to force-install File::HomeDir
before installing Crypt::HSXKPasswd
. This can be done with the -i
and -f
flags to the cpan
command:
sudo cpan -f -I File::HomeDir
With File::HomeDir
now installed, Crypt::HSXKPasswd
will install with the usual simple CPAN command:
sudo cpan Crypt::HSXKPasswd
I think you also need to force the install of the hsxkpasswd module. At least in my MacOS I needed that because it was complaining about the dependencies not installed, even though File::HomeDir was there.