読者です 読者をやめる 読者になる 読者になる

学生の備忘録なブログ

日々のことを忘れないためのブログです。

brew install nmap できなかった.

nmapインストールに際し,失敗した.

% brew install nmap
Updating Homebrew...
==> Auto-updated Homebrew!
Updated 5 taps (caskroom/cask, caskroom/versions, homebrew/core, homebrew/services, homebrew/versions).
==> New Formulae
guile@2.0                                                                nnn
==> Updated Formulae
ace                          exiftool                     jenkins                      mysql-sandbox                servus
ammonite-repl                fabio                        jetty                        nagios-plugins               shadowsocks-libev
ansible ✔                    file-roller                  jetty-runner                 ncmpcpp                      shfmt
antigen                      filebeat                     jmxtrans                     neofetch                     slackcat
aws-sdk-cpp                  fluent-bit                   kafkacat                     nginx                        sleuthkit
awscli                       folly                        kibana                       nss                          solr
bazel@0.2                    fox                          knot-resolver                nvm                          source-highlight
bear                         fping                        kobalt                       oauth2_proxy                 speedtest_cli
bind                         fq                           kotlin                       open-scene-graph             swift
biogeme                      freeling                     lapack                       orientdb                     swiftformat
bmake                        geckodriver                  lcdf-typetools               osh                          syncthing
boost                        git-fresh                    ldc                          osquery                      tee-clc
boost-bcp                    git-lfs                      ledger                       osrm-backend                 terragrunt
boost-mpi                    git-quick-stats              libgeotiff                   packer                       tmux
boost-python                 gitlab-ci-multi-runner       libgosu                      packetbeat                   uhd
buku                         gjs                          libhttpseverywhere           paket                        unicorn
bullet                       glbinding                    libphonenumber               parallel                     unzip
byteman                      globjects                    libsoup                      pdftoedn                     urh
caddy                        grc                          libtorrent-rasterbar         pick                         vagrant-completion
carthage                     grpc                         libvirt                      pmd                          vala
casperjs                     gssh                         libwebsockets                polyml                       valabind
closure-compiler             gtef                         lilv                         ponyc                        vim
conan                        guile                        llnode                       poppler                      watchexec
convox                       h2o                          logstash                     proof-general                weechat
crystal-lang                 harfbuzz                     lumo                         pure-ftpd                    wesnoth
cucumber-cpp                 hg-fast-export               lv2                          pyexiv2                      widelands
docker-machine               hugo                         meson                        q                            wine ✔
docker-machine-completion    imagemagick ✔                metaproxy                    qbs                          wireguard-tools
docker-machine-driver-xhyve  imagemagick@6                metricbeat                   qemu                         youtube-dl ✔
docker-machine-parallels     imageworsener                mkvtoolnix                   scalaenv                     zabbix
elasticsearch                instead                      mongodb                      schismtracker
emacs ✔                      iproute2mac                  mpv                          sdcv
emscripten                   iso-codes                    mycli                        selenium-server-standalone
==> Renamed Formulae
mongodb26 -> mongodb@2.6

==> Downloading https://homebrew.bintray.com/bottles/nmap-7.40.sierra.bottle.tar.gz
######################################################################## 100.0%
==> Pouring nmap-7.40.sierra.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 share/man/de/man1/nmap.1
/usr/local/share/man/de/man1 is not writable.

You can try again using:
  brew link nmap
==> Caveats
Python modules have been installed and Homebrew's site-packages is not
in your Python sys.path, so you will not be able to import the modules
this formula installed. If you plan to develop with these modules,
please run:
  mkdir -p /Users/hoge/.local/lib/python3.5/site-packages
  echo 'import site; site.addsitedir("/usr/local/lib/python2.7/site-packages")' >> /Users/hoge/.local/lib/python3.5/site-packages/homebrew.pth
==> Summary
🍺  /usr/local/Cellar/nmap/7.40: 761 files, 24.3MB/Users/hoge% brew install nmap
Updating Homebrew...
==> Auto-updated Homebrew!
Updated 5 taps (caskroom/cask, caskroom/versions, homebrew/core, homebrew/services, homebrew/versions).
==> New Formulae
guile@2.0                                                                nnn
==> Updated Formulae
ace                          exiftool                     jenkins                      mysql-sandbox                servus
ammonite-repl                fabio                        jetty                        nagios-plugins               shadowsocks-libev
ansible ✔                    file-roller                  jetty-runner                 ncmpcpp                      shfmt
antigen                      filebeat                     jmxtrans                     neofetch                     slackcat
aws-sdk-cpp                  fluent-bit                   kafkacat                     nginx                        sleuthkit
awscli                       folly                        kibana                       nss                          solr
bazel@0.2                    fox                          knot-resolver                nvm                          source-highlight
bear                         fping                        kobalt                       oauth2_proxy                 speedtest_cli
bind                         fq                           kotlin                       open-scene-graph             swift
biogeme                      freeling                     lapack                       orientdb                     swiftformat
bmake                        geckodriver                  lcdf-typetools               osh                          syncthing
boost                        git-fresh                    ldc                          osquery                      tee-clc
boost-bcp                    git-lfs                      ledger                       osrm-backend                 terragrunt
boost-mpi                    git-quick-stats              libgeotiff                   packer                       tmux
boost-python                 gitlab-ci-multi-runner       libgosu                      packetbeat                   uhd
buku                         gjs                          libhttpseverywhere           paket                        unicorn
bullet                       glbinding                    libphonenumber               parallel                     unzip
byteman                      globjects                    libsoup                      pdftoedn                     urh
caddy                        grc                          libtorrent-rasterbar         pick                         vagrant-completion
carthage                     grpc                         libvirt                      pmd                          vala
casperjs                     gssh                         libwebsockets                polyml                       valabind
closure-compiler             gtef                         lilv                         ponyc                        vim
conan                        guile                        llnode                       poppler                      watchexec
convox                       h2o                          logstash                     proof-general                weechat
crystal-lang                 harfbuzz                     lumo                         pure-ftpd                    wesnoth
cucumber-cpp                 hg-fast-export               lv2                          pyexiv2                      widelands
docker-machine               hugo                         meson                        q                            wine ✔
docker-machine-completion    imagemagick ✔                metaproxy                    qbs                          wireguard-tools
docker-machine-driver-xhyve  imagemagick@6                metricbeat                   qemu                         youtube-dl ✔
docker-machine-parallels     imageworsener                mkvtoolnix                   scalaenv                     zabbix
elasticsearch                instead                      mongodb                      schismtracker
emacs ✔                      iproute2mac                  mpv                          sdcv
emscripten                   iso-codes                    mycli                        selenium-server-standalone
==> Renamed Formulae
mongodb26 -> mongodb@2.6

==> Downloading https://homebrew.bintray.com/bottles/nmap-7.40.sierra.bottle.tar.gz
######################################################################## 100.0%
==> Pouring nmap-7.40.sierra.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 share/man/de/man1/nmap.1
/usr/local/share/man/de/man1 is not writable.

You can try again using:
  brew link nmap
==> Caveats
Python modules have been installed and Homebrew's site-packages is not
in your Python sys.path, so you will not be able to import the modules
this formula installed. If you plan to develop with these modules,
please run:
  mkdir -p /Users/hoge/.local/lib/python3.5/site-packages
  echo 'import site; site.addsitedir("/usr/local/lib/python2.7/site-packages")' >> /Users/hoge/.local/lib/python3.5/site-packages/homebrew.pth
==> Summary
🍺  /usr/local/Cellar/nmap/7.40: 761 files, 24.3MB

嫌にならずに見ていく.

エラーをよく見ると

 親切なことに,エラー警告の最後の方に,改善提案があったのでやってみたら治った.

 以下の通りにやってみた.

You can try again using:
  brew link nmap
==> Caveats
Python modules have been installed and Homebrew's site-packages is not
in your Python sys.path, so you will not be able to import the modules
this formula installed. If you plan to develop with these modules,
please run:
  mkdir -p /Users/hoge/.local/lib/python3.5/site-packages
  echo 'import site; site.addsitedir("/usr/local/lib/python2.7/site-packages")' >> /Users/hoge/.local/lib/python3.5/site-packages/homebrew.pth
==> Summary
🍺  /usr/local/Cellar/nmap/7.40: 761 files, 24.3MB

教訓

何事も焦らず迅速に.

エラーを吐き,提案をしてくれるbrewは優秀ですね.

brew doctor

brew doctor

してみた結果,めちゃめちゃエラーはいたので,見なかったことにします.

参考元

http://qiita.com/ren-10/items/1c1764100aa4b1c7b514