hasen's tech life

Twitter: @hasen

Received disconnect from port 22:2: too many authentication failures というエラーが出たので対応した.

$ git fetch -p
> Received disconnect from port 22:2: too many authentication failures
> Authentication failed.
> fatal: Could not read from remote repository.
>
> Please make sure you have the correct access rights
> and the repository exists.

$ vi ~/.ssh/config
Host bitbucket.org
 AddKeysToAgent no
 IdentitiesOnly yes
 HostName bitbucket.org
 IdentityFile /PATH/TO/.ssh/id_rsa

$ chmod 600 ~/.ssh/config

# bundlerでエラーが出たので対応した.

# bundlerでエラーが出たので対応した.

# Ruby
$ ./bin/bundle i
An error occurred while installing nokogiri (1.6.8.1), and Bundler cannot continue.
Make sure that `gem install nokogiri -v '1.6.8.1' --source 'https://rubygems.org/'` succeeds before bundling.

$ gem install nokogiri -v 1.6.8.1
Building native extensions. This could take a while...
ERROR: Error installing nokogiri:
ERROR: Failed to build gem native extension.

$ brew install libxml2
$ ./bin/bundle i

$ gem install therubyracer -v 0.12.2
Building native extensions. This could take a while...
ERROR: Error installing therubyracer:
ERROR: Failed to build gem native extension.

$ gem uninstall libv8
$ gem install therubyracer -v 0.12.2
$ gem install libv8

# 新しい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
ABORT

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
参考

あとはそれぞれファイル名でfindして,シンボリックリンクをはったり.

HomebrewでPHPを7.1から7.2にアップデート.

# HomebrewでPHPを7.1から7.2にアップデート.

$ brew unlink php@7.1
$ brew link php@7.2
$ echo 'export PATH="/usr/local/opt/php@7.2/bin:$PATH"' >> ~/.bash_profile
$ echo 'export PATH="/usr/local/opt/php@7.2/sbin:$PATH"' >> ~/.bash_profile
$ exec $SHELL -l

CentOS7にPostgre9.5をインストールした

# CentOS7にPostgre9.5をインストールした.

$ wget https://download.postgresql.org/pub/repos/yum/9.5/redhat/rhel-7-x86_64/pgdg-centos95-9.5-2.noarch.rpm
$ sudo rpm -ivh pgdg-centos95-9.5-2.noarch.rpm
$ sudo vi /etc/yum.repos.d/pgdg-95-centos.repo
-- enabled=1
++ enabled=0
$ sudo yum -y install postgresql95-server postgresql95-devel postgresql95-contrib --enablerepo=pgdg95
$ psql --version
> psql (PostgreSQL) 9.5.15
$ /usr/pgsql-9.5/bin/postgresql95-setup initdb