Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

After installing MacOS Big Sur I get the error: Can't locate File/HomeDir.pm #40

Open
prutsky opened this issue Nov 30, 2020 · 4 comments

Comments

@prutsky
Copy link

prutsky commented Nov 30, 2020

I updated my Mac with Big Sur. Now the hsxkpasswd script won't run anymore. I get the following error:

Can't locate File/HomeDir.pm in @INC (you may need to install the File::HomeDir module) (@INC contains: /Library/Perl/5.28/darwin-thread-multi-2level /Library/Perl/5.28 /Network/Library/Perl/5.28/darwin-thread-multi-2level /Network/Library/Perl/5.28 /Library/Perl/Updates/5.28.2/darwin-thread-multi-2level /Library/Perl/Updates/5.28.2 /System/Library/Perl/5.28/darwin-thread-multi-2level /System/Library/Perl/5.28 /System/Library/Perl/Extras/5.28/darwin-thread-multi-2level /System/Library/Perl/Extras/5.28) at /usr/local/bin/hsxkpasswd line 14. BEGIN failed--compilation aborted at /usr/local/bin/hsxkpasswd line 14.

I googled and found I maybe needed to install the himedir (again) using sudo cpan -i File::HomeDir . But no luck with that.

When I install hsxkpasswd from scratch I see this error passing by in the logging:
HASCOMPILER8_2A/TEST4bx0.c:2:10: fatal error: 'EXTERN.h' file not found #include "EXTERN.h" ^~~~~~~~~~ 1 error generated. Couldn't execute cc -g -pipe -fno-strict-aliasing -fstack-protector-strong -DPERL_USE_SAFE_PUTENV -Os "-I/System/Library/Perl/5.28/darwin-thread-multi-2level/CORE" -c HASCOMPILER8_2A/TEST4bx0.c -o HASCOMPILER8_2A/TEST4bx0.o: Inappropriate ioctl for device at Makefile.PL line 14.

(I updated Xcode btw).

What can I do to make this work again?

@jimtut
Copy link

jimtut commented Dec 4, 2020

Having the same problem, although with a different Perl module (updating CPAN itself!). Any luck getting HomeDir (or more technically Mac::SystemDirectory, which is actually what's failing, at least for me) to install under Big Sur (macOS 11.0)? I'm on an M1 Mac too, so that could be my problem...

@JosephLeedy
Copy link

I experienced this too on a 2018 Mac Mini. Here is how I fixed it:

  1. Installed Perl from Homebrew with brew install perl
  2. Ran brew link --overwrite perl*
  • * This was necessary to overwrite the system symlinks in /usr/local/bin created when I originally installed the module on Catalina
  1. Added /usr/local/opt/perl/bin to my $PATH

The system Perl seems hobbled and useless now.

@prutsky
Copy link
Author

prutsky commented Dec 10, 2020

When I install Perl, I get this output:

brew install perl
Updating Homebrew...
==> Auto-updated Homebrew!
Updated 1 tap (homebrew/core).
==> New Formulae
aerc                f3d                 librttopo           tm
aws-rotate-key      giza                libtirpc            utf8cpp
bpytop              gopls               [email protected]             v2ray
[email protected]        gping               magic_enum          xcb-util
cargo-edit          json5               overdrive           xinput
cfn-format          kcgi                [email protected]             xkeyboardconfig
clash               kubecm              regipy              youtube-dlc
docui               kubevela            t-rec               youtubedr
duf                 libbsd              tendermint
evernote2md         libcap              [email protected]
==> Updated Formulae
Updated 4604 formulae.
==> Renamed Formulae
now-cli -> vercel-cli
==> Deleted Formulae
curl-openssl               rmtrash                    unp64
fmsx                       stlviewer                  xspin

==> Downloading https://homebrew.bintray.com/bottles/perl-5.32.0.big_sur.bottle.
==> Downloading from https://d29vzk4ow07wi7.cloudfront.net/7db44dc9609acbada14bd
######################################################################## 100.0%
==> Pouring perl-5.32.0.big_sur.bottle.tar.gz
Error: The `brew link` step did not complete successfully
The formula built, but is not symlinked into /usr/local
Could not symlink bin/prove
Target /usr/local/bin/prove
already exists. You may want to remove it:
  rm '/usr/local/bin/prove'

To force the link and overwrite all conflicting files:
  brew link --overwrite perl

To list all files that would be deleted:
  brew link --overwrite --dry-run perl

Possible conflicting files are:
/usr/local/bin/prove
/usr/local/share/man/man1/prove.1
==> Caveats
By default non-brewed cpan modules are installed to the Cellar. If you wish
for your modules to persist across updates we recommend using `local::lib`.

You can set that up like this:
  PERL_MM_OPT="INSTALL_BASE=$HOME/perl5" cpan local::lib
  echo 'eval "$(perl -I$HOME/perl5/lib/perl5 -Mlocal::lib=$HOME/perl5)"' >> /Users/erwin/.bash_profile
==> Summary
🍺  /usr/local/Cellar/perl/5.32.0: 2,458 files, 65.0MB
==> `brew cleanup` has not been run in 30 days, running now...
Removing: /Users/erwin/Library/Logs/Homebrew/libusb... (64B)
Pruned 0 symbolic links and 317 directories from /usr/local

and when I ran brew link --overwrite perl* I get:
Error: No such keg: /usr/local/Cellar/perl5

@JosephLeedy
Copy link

Sorry, the asterisk was a footnote, not a part of the command.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants