hasen's tech life

Twitter: @hasen

# 新しいMacの環境構築でいろいろとエラーが出たので対応した.

# 新しいMacの環境構築でいろいろとエラーが出たので対応した.

# Vim
$ vi hoge
dyld: Library not loaded: /usr/local/opt/perl/lib/perl5/5.26.1/darwin-thread-multi-2level/CORE/libperl.dylib
Referenced from: /usr/local/bin/vim
Reason: image not found
Abort trap: 6

# ruby
$ rbenv install 2.2.10
Downloading openssl-1.0.2o.tar.gz...
-> https://dqw8nmjcqpjn7.cloudfront.net/ec3f5c9714ba0fd45cb4e087301eb1336c317e0d20b575a125050470e8089e4d
Installing openssl-1.0.2o...

BUILD FAILED (OS X 10.14.4 using ruby-build 20180601)

Inspect or clean up the working tree at /var/folders/8d/8t2h2znj4p31dw96l2blmrfc0000gn/T/ruby-build.20190429094009.38473
Results logged to /var/folders/8d/8t2h2znj4p31dw96l2blmrfc0000gn/T/ruby-build.20190429094009.38473.log

Last 10 log lines:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include/sys/resource.h:213:2: error: unknown type name 'uint64_t'
uint64_t ri_pkg_idle_wkups;
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include/sys/resource.h:214:2: error: unknown type name 'uint64_t'
uint64_t ri_interrupt_wkups;
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
make[1]: *** [cryptlib.o] Error 1
make: *** [build_crypto] Error 1

# perl
$ plenv install 5.26.1
Installing 5.26.1 as 5.26.1
/usr/local/bin/perl -- /usr/local/bin/perl-build --symlink-devel-executables --build-dir /PATH/TO/.plenv/build/1556469449.82001/ --tarball-dir /PATH/TO/.plenv/cache/ -Dusedevel -Dcc=gcc 5.26.1 /PATH/TO/.plenv/versions/5.26.1
WARN: [cpan_perl_releases] not found the tarball for perl-5.26.1
WARN: [perl_releases_page] This page is 3 or more days old. ignore
WARN: [search_cpan_org] not found the tarball for perl-5.26.1
ERROR: Cannot find the tarball for perl-5.26.1

Checking out function prototypes...
Your C compiler doesn't seem to understand function prototypes.

Configure: FATAL ERROR:
This version of perl5 can only be compiled by a compiler that
understands function prototypes. Unfortunately, your C compiler
cc -fno-common -DPERL_DARWIN -mmacosx-version-min=10.14 -fno-strict-aliasing -pipe -fstack-protector-strong -I/usr/local/include -I/opt/local/include
doesn't seem to understand them. Sorry about that.

If GNU cc is available for your system, perhaps you could try that instead.

$ mv /usr/local/include /usr/local/include_old