SREとはのブログ

日々の作業メモ

MACbookでGNS3を利用し自分のMACbookをCiscoRouteに接続する方法

目的

MACbookでGNS3を利用し自分のMACbookをCiscoRouteに接続する方法を記載します

前提

  • 前提 MACBookでGNS3は構築されて動いていることが前提です。

  • この方法は正しいかわからないです。とりあえず動かしたい人用です。

  • MAC Bookを終了させたりすると一からやらないといけない

環境

Operating System: MAC OS 10.14.5 Mojav3 GNS3 Software Version: GNS3 2.2.5

f:id:taishibrown3:20200413212023p:plain

対象

おそらく下記が出ている方

f:id:taishibrown3:20200413211631p:plain

Error while sending command 'bridge add_nio_tap 2d6afde7-5ff2-4ae2-a261-521d5c810d54-11 "tap0"': unable to create NIO TAP for bridge '2d6afde7-5ff2-4ae2-a261-521d5c810d54-11': uBridge version 0.9.16 running with libpcap version 1.8.1 -- Apple version 79.250.1 Hypervisor TCP control server started (IP 127.0.0.1 port 53630). UDP tunnel connecting from local port 10000 to IPv4 addresss 127.0.0.1 on port 10001 create_nio_tap: unable to open TAP device tap0 (Resource busy)

手順

手順1 tuntapをインストール

tun tapをインストールする

brew cask install tuntap

手順2 tun tapがインストールされていることを確認

tun tapがインストールされていることを確認する

➜ ll /dev/ | grep tap
crw-rw----   1 root  wheel           31,   0  4 13 21:56 tap0
crw-rw----   1 root  wheel           31,   1  4  7 10:33 tap1
crw-rw----   1 root  wheel           31,  10  4  7 10:33 tap10
crw-rw----   1 root  wheel           31,  11  4  7 10:33 tap11
crw-rw----   1 root  wheel           31,  12  4  7 10:33 tap12
crw-rw----   1 root  wheel           31,  13  4  7 10:33 tap13
crw-rw----   1 root  wheel           31,  14  4  7 10:33 tap14
crw-rw----   1 root  wheel           31,  15  4  7 10:33 tap15
crw-rw----   1 root  wheel           31,   2  4  7 10:33 tap2
crw-rw----   1 root  wheel           31,   3  4  7 10:33 tap3
crw-rw----   1 root  wheel           31,   4  4  7 10:33 tap4
crw-rw----   1 root  wheel           31,   5  4  7 10:33 tap5
crw-rw----   1 root  wheel           31,   6  4  7 10:33 tap6
crw-rw----   1 root  wheel           31,   7  4  7 10:33 tap7
crw-rw----   1 root  wheel           31,   8  4  7 10:33 tap8
crw-rw----   1 root  wheel           31,   9  4 13 21:48 tap9

手順3 利用するtapのパーミッションを変更

tap0のパーミッションを変更する*1

cd /dev/
sudo chmod 777 tap0

➜ ll /dev/ | grep tap
crwxrwxrwx   1 root  wheel           31,   0  4 13 21:56 tap0
crw-rw----   1 root  wheel           31,   1  4  7 10:33 tap1

手順4 tapを起動

tap0を起動する [n]<>が何かを知りたい人はこちら

exec 3<>/dev/tap0

手順5 tapが動いていることの確認

tap0が付いていることを確認する ifconfig

(略)
tap0: flags=8842<BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
    ether 82:35:b3:4e:79:7a
    media: autoselect
    status: active
    open (pid 19303)

手順6 GNS3にcloudを設置

GNS3からCloudをだす

f:id:taishibrown3:20200413223307p:plain

ここは自分のPC名

f:id:taishibrown3:20200413223337p:plain

手順7 Cloudの設定変更

cloudを指2本でタップしてConfigureをクリック

f:id:taishibrown3:20200413223747p:plain

手順8 tapを登録

TAP Interfacesをクリックして TAP0を登録する

f:id:taishibrown3:20200413224354p:plain

こうなる f:id:taishibrown3:20200413224345p:plain

手順9 CloudとRouterのケーブルを接続

GNS3からCloudとRouterのケーブルを接続する f:id:taishibrown3:20200413224957p:plain

こんな感じに f:id:taishibrown3:20200413225126p:plain

これでできたーと喜ぶと 多分こうなる(´・ω・`)

f:id:taishibrown3:20200413225210p:plain

雑談1

色々聞いてみる(´;ω;`)<ボスケテ www.gns3.com

負けずに公式にも聞いてみる(´;ω;`)<ボスケテボスケテ

github.com

反応が無いため 自分の構築が悪いのか むしろみんなスムーズに動いていて質問することでは無いのかと思い始める

ここからほんとよくわからなかったので 手順10移行は自分が動いた方法を記載します。 なので環境によっては動かない人がいたらすみません

手順10 ケーブルを削除

ケーブルを選択し線をタップして1回削除します f:id:taishibrown3:20200413231012p:plain

手順11 ターミナルを終了

exec 3<>tap0を動かした ターミナルを落とします。

f:id:taishibrown3:20200413231230p:plain

exit

手順12 ターミナルを起動

ターミナルを起動させます ifconigで tap0が無いことを確認します。

手順13 CloudとRouterを接続

GNS3からCloudとRouterのケーブルを接続する f:id:taishibrown3:20200413224957p:plain

こんな感じに f:id:taishibrown3:20200413225126p:plain

手順14 接続できる

するとなぜか接続できる! f:id:taishibrown3:20200413231655p:plain

雑談2

おそらくなのですがtap0を起動させているままだと重複して読み込め無いのかな 'bridge add_nio_tap 2d6afde7-5ff2-4ae2-a261-521d5c810d54-11 "tap0"

手順15 ifconfigで自動で作成されているのを確認

ifconfigで確認するとtap0が自動で作られている この自動で作られているというのが大事

ifconfig

(略)
tap0: flags=8842<BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
    ether 46:18:f6:0b:f2:63
    media: autoselect
    status: active
    open (pid 44810)

手順16 tapにIpアドレスを登録する

IPアドレスが設定されていないので ifconfig コマンドでIpをp設定する

sudo ifconfig tap0 10.0.0.1/24 up

ifconfig
(略)
tap0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
    ether 46:18:f6:0b:f2:63
    inet 10.0.0.1 netmask 0xffffff00 broadcast 10.0.0.255
    media: autoselect
    status: active
    open (pid 44810)

手順17 自分のtapにPingが飛ぶことを確認

pingが飛ぶことを確認する

ping 10.0.0.1
PING 10.0.0.1 (10.0.0.1): 56 data bytes
64 bytes from 10.0.0.1: icmp_seq=0 ttl=64 time=0.041 ms
64 bytes from 10.0.0.1: icmp_seq=1 ttl=64 time=0.049 ms
64 bytes from 10.0.0.1: icmp_seq=2 ttl=64 time=0.087 ms

手順18 ciscoIpアドレスを設定

Ciscoを設定する

R1#config t
Enter configuration commands, one per line.  End with CNTL/Z.
R1(config)#interface ethernet 0/0
R1(config-if)# ip address 10.0.0.2 255.255.255.0
R1(config-if)#no sh
R1(config-if)#no shutdown 

手順19 Pingを飛ばす

CiscoPingを飛ばす

➜ ping 10.0.0.2
PING 10.0.0.2 (10.0.0.2): 56 data bytes
64 bytes from 10.0.0.2: icmp_seq=0 ttl=255 time=22.978 ms
64 bytes from 10.0.0.2: icmp_seq=1 ttl=255 time=10.092 ms

おまけ

sshする

ここのサイトを参考に設定する www.infraexpert.com

下記の特権モードのパスワードを忘れずに

enable secret cisco ← お好きなパスワード

crypto key generate rsaは 4096が使えないので 2048ぐらいで勘弁

macからssh

こうなるので

➜ ssh admin@10.0.0.2
Unable to negotiate with 10.0.0.2 port 22: no matching key exchange method found. Their offer: diffie-hellman-group1-sha1

vim ~/.ssh/config に下記を記載する

Host 10.0.0.2
KexAlgorithms +diffie-hellman-group1-sha1
Ciphers aes128-cbc

これでできる

macからAnsible

パスワードの書き方 hostsに書いているのは許して

➜ cat hosts
[cisco]
10.0.0.2

[cisco:vars]
ansible_connection=network_cli
ansible_network_os=ios
ansible_ssh_user=admin
ansible_ssh_pass=cisco
ansible_become=yes
ansible_become_method=enable
ansible_become_pass=cisco
➜ ansible -i hosts cisco -m ping
[WARNING]: Platform darwin on host 10.0.0.2 is using the discovered Python
interpreter at /usr/bin/python, but future installation of another Python
interpreter could change this. See https://docs.ansible.com/ansible/2.9/referen
ce_appendices/interpreter_discovery.html for more information.

10.0.0.2 | SUCCESS => {
    "ansible_facts": {
        "discovered_interpreter_python": "/usr/bin/python"
    },
    "changed": false,
    "ping": "pong"
}

参考サイト

TunTap - Home

*1:多分777じゃなくていいがよくわかってないのでとりあえず777

gitでswitchが使えてなかった

なんのため

gitでswitchが使えてなかったのでversionup

参考サイト

allyourbase.hatenablog.com

メモ

これをやらなかったが動いている

bash_profileに追加します。

$ vim ~/.bash_profile
PATH=/usr/local/git/bin:$PATH
export PATH
$ source ~/.bash_profile

インストールメモ

[13:38:15] tm@tm-22 /Users/tm/ghq/github.com/Oisix/sre-skill-docs (1)
> brew cask list
clipy                         font-fira-code                google-chrome                 iterm2                        slack                         tuntap                        virtualbox                    visual-studio-code
docker                        gns3                          hyperswitch                   kindle                        spectacle                     vagrant                       virtualbox-extension-pack     wireshark
[13:38:22] tm@tm-22 /Users/tm/ghq/github.com/Oisix/sre-skill-docs (0)
> brew  list
ansible         fish            ghq             grc             hwloc           libmpc          minikube        openssl         perl            python          rust            tmux            xz
autoconf        gcc             glide           hping           isl             libssh2         mpfr            openssl@1.1     pexpo           python@3.8      sqlite          tree
bash-completion gdbm            gmp             httping         kubernetes-cli  libyaml         ncurses         pcre2           pkg-config      readline        starship        unar
fftw            gettext         go              hub             libevent        lua             open-mpi        peco            pyenv           ruby            telnet          vim
[13:38:26] tm@tm-22 /Users/tm/ghq/github.com/Oisix/sre-skill-docs (0)
> brew info git
git: stable 2.25.0 (bottled), HEAD
Distributed revision control system
https://git-scm.com
Not installed
From: https://github.com/Homebrew/homebrew-core/blob/master/Formula/git.rb
==> Dependencies
Required: gettext ✔, pcre2 ✘
==> Options
--HEAD
        Install HEAD version
==> Caveats
The Tcl/Tk GUIs (e.g. gitk, git-gui) are now in the `git-gui` formula.
==> Analytics
install: 120,379 (30 days), 514,994 (90 days), 1,874,805 (365 days)
install-on-request: 114,884 (30 days), 486,067 (90 days), 1,754,105 (365 days)
build-error: 0 (30 days)
[13:43:21] tm@tm-22 /Users/tm/ghq/github.com/Oisix/sre-skill-docs (0)
> brew install git
Updating Homebrew...
==> Auto-updated Homebrew!
Updated 1 tap (homebrew/core).
==> New Formulae
archiver                                                                                                                qp
==> Updated Formulae
abseil                    apibuilder-cli            artifactory               aws-cdk                   cfn-lint                  exploitdb                 hostess                   luaradio                  stress-ng

==> Installing dependencies for git: pcre2
==> Installing git dependency: pcre2
==> Downloading https://homebrew.bintray.com/bottles/pcre2-10.34.mojave.bottle.tar.gz
==> Downloading from https://akamai.bintray.com/9b/9bc0815c6c4c584ef16e93e5ecf37aa786303d88f9321274a29b4f60876d583f?__gda__=exp=1583643349~hmac=64020c62ddd122dd20a5f5d5994dcb1f9e21c05482f2355b369b6097a4794895&response-content-disposition=
######################################################################## 100.0%
==> Pouring pcre2-10.34.mojave.bottle.tar.gz
🍺  /usr/local/Cellar/pcre2/10.34: 230 files, 5.9MB
==> Installing git
==> Downloading https://homebrew.bintray.com/bottles/git-2.25.0_1.mojave.bottle.tar.gz
==> Downloading from https://akamai.bintray.com/54/54508f6ad675b1a3964d8576b9123d1459f6edf4f8847e229b56ec76cf49014b?__gda__=exp=1583643354~hmac=8ed7ab9be6fb7bbaa2c4c14c0bb95912e4262f28be54653e47d7937441ed3bb5&response-content-disposition=
######################################################################## 100.0%
==> Pouring git-2.25.0_1.mojave.bottle.tar.gz
==> Caveats
The Tcl/Tk GUIs (e.g. gitk, git-gui) are now in the `git-gui` formula.

Bash completion has been installed to:
  /usr/local/etc/bash_completion.d

zsh completions and functions have been installed to:
  /usr/local/share/zsh/site-functions

Emacs Lisp files have been installed to:
  /usr/local/share/emacs/site-lisp/git
==> Summary
🍺  /usr/local/Cellar/git/2.25.0_1: 1,443 files, 43.5MB
==> Caveats
==> git
The Tcl/Tk GUIs (e.g. gitk, git-gui) are now in the `git-gui` formula.

Bash completion has been installed to:
  /usr/local/etc/bash_completion.d

zsh completions and functions have been installed to:
  /usr/local/share/zsh/site-functions

Emacs Lisp files have been installed to:
  /usr/local/share/emacs/site-lisp/git
[13:44:07] tm@tm-22 /Users/tm/ghq/github.com/Oisix/sre-skill-docs (0)
> git --version
git version 2.25.0
[13:44:14] tm@tm-22 /Users/tm/ghq/github.com/Oisix/sre-skill-docs (0)
>

ghqを使ってひらがなをbashで入力するとBugバグる

メモ

多分自分のやり方が悪いんだと思うが ここのサイトのghq呼び出しを参考にしてやったところ bashでひらがなを書いてEnter押すとghqに移動してフリーズをしてしまっていました。 (ghq+PecoのPecoはここを参考にしている) qiita.com

こっちのもやってみたがやはりひらがなEnterのフリーズが治らない

ghqとpecoが便利すぎたので快適なcd(change directory)方法を紹介する【bash対応】 - Qiita

でもこちらを参考にしたら治りました、

[http://dempatow.hatenablog.com/entry/2016/09/14/ghq%2B_peco%E3%81%A7%E4%BE%BF%E5%88%A9%E3%81%AA%E9%96%A2%E6%95%B0%28bash%29]

ただ、

bind -x '"\C-r": ghql'

なので ショートカットをcontrol+gにしたかったので bind -x '"\C-g": ghql' に修正

function ghql() {
  local selected_file=$(ghq list --full-path | peco --query "$LBUFFER")
  if [ -n "$selected_file" ]; then
    if [ -t 1 ]; then
      echo ${selected_file}
      cd ${selected_file}
    fi
  fi
}
bind -x '"\C-g": ghql'

助かりました。

brew install pyenv

メモ

メモ

メモ
> brew install pyenv
Updating Homebrew...
==> Auto-updated Homebrew!
Updated 2 taps (homebrew/core and homebrew/cask).
==> Updated Formulae
docker-slim                                                 jetty                                                       xcodegen                                                    zsh-syntax-highlighting

==> Installing dependencies for pyenv: autoconf
==> Installing pyenv dependency: autoconf
==> Downloading https://homebrew.bintray.com/bottles/autoconf-2.69.mojave.bottle.4.tar.gz
==> Downloading from https://akamai.bintray.com/97/9724736d34773b6e41e2434ffa28fe79feccccf7b7786e54671441ca75115cdb?__gda__=exp=1583149373~hmac=8ed3bc1984b1ac329f76ed2c5c77be5544768ab7e7a4f0096df94e35ecf30830&response-content-disposition=
######################################################################## 100.0%
==> Pouring autoconf-2.69.mojave.bottle.4.tar.gz
==> Caveats
Emacs Lisp files have been installed to:
  /usr/local/share/emacs/site-lisp/autoconf
==> Summary
🍺  /usr/local/Cellar/autoconf/2.69: 71 files, 3.0MB
==> Installing pyenv
==> Downloading https://homebrew.bintray.com/bottles/pyenv-1.2.16.mojave.bottle.tar.gz
==> Downloading from https://akamai.bintray.com/e1/e16a7e18f0c439d1e8281cc512296d2cf289e538a2364c1b83e4384bf53c2a43?__gda__=exp=1583149379~hmac=f118b712e38603a8759028d5c55b04c5be53fd14d8a71a9f873d08c22d920861&response-content-disposition=
######################################################################## 100.0%
==> Pouring pyenv-1.2.16.mojave.bottle.tar.gz
🍺  /usr/local/Cellar/pyenv/1.2.16: 671 files, 2.5MB
==> Caveats
==> autoconf
Emacs Lisp files have been installed to:
  /usr/local/share/emacs/site-lisp/autoconf
[20:31:04] tm@tm-22 /Users/tm (0)

brew install ansible

メモ

brew install ansible

> brew install ansible
Updating Homebrew...
==> Auto-updated Homebrew!
Updated 3 taps (homebrew/core, homebrew/cask and caskroom/fonts).
==> Updated Formulae
telnet ✔            aws-google-auth     clblast             dhall-json          flyway              i2p                 less                man-db              osquery             root                swiftformat         zero-install
tmux ✔              azure-storage-cpp   cobalt              dhall-lsp-server    folly               imagemagick         lesspipe            mill                pastel              rpcgen              tealdeer            zookeeper
vim ✔               b3sum               coccinelle          dps8m               fonttools           imagemagick@6       lft                 mongoose            pdfpc               serverless          telnetd             zydis
abcm2ps             bitrise             consul              dust                geoipupdate         jruby               libfido2            ne                  pgpool-ii           shadowenv           topgrade
agda                byteman             cpprestsdk          dvc                 gmsh                juju                libgphoto2          needle              pjproject           sleuthkit           wasmer
allure              camlp5              cromwell            dyld-headers        gptfdisk            kops                libgr               nifi                qca                 solr                webpack
angle-grinder       cargo-instruments   dhall               erlang              grails              lapack              libjwt              numpy@1.16          rancid              solr@7.7            xmake
appstream-glib      cfengine            dhall-bash          firebase-cli        graphicsmagick      latex2html          libunwind-headers   nwchem              ratfor              stress-ng           yq
==> Deleted Formulae
neal

==> Installing dependencies for ansible: readline, sqlite and python@3.8
==> Installing ansible dependency: readline
==> Downloading https://homebrew.bintray.com/bottles/readline-8.0.4.mojave.bottle.tar.gz
==> Downloading from https://akamai.bintray.com/29/29f7102a730ab39c8312cad1e7e439f6da2a67c452ce2b3380581eb185a5d8e8?__gda__=exp=1583040182~hmac=4cd69795b7b1179d5c38bc4ca55c62e33cc5383fecf6e78f558e04f707f3fe68&response-content-disposition=
######################################################################## 100.0%
==> Pouring readline-8.0.4.mojave.bottle.tar.gz
==> Caveats
readline is keg-only, which means it was not symlinked into /usr/local,
because macOS provides the BSD libedit library, which shadows libreadline.
In order to prevent conflicts when programs look for libreadline we are
defaulting this GNU Readline installation to keg-only.

For compilers to find readline you may need to set:
  export LDFLAGS="-L/usr/local/opt/readline/lib"
  export CPPFLAGS="-I/usr/local/opt/readline/include"

For pkg-config to find readline you may need to set:
  export PKG_CONFIG_PATH="/usr/local/opt/readline/lib/pkgconfig"

==> Summary
🍺  /usr/local/Cellar/readline/8.0.4: 48 files, 1.5MB
==> Installing ansible dependency: sqlite
==> Downloading https://homebrew.bintray.com/bottles/sqlite-3.31.1.mojave.bottle.tar.gz
==> Downloading from https://akamai.bintray.com/db/db7e3a6498bfdb4b4ceb8e8416020e2ad70de14975437f2e2a027485daeb2202?__gda__=exp=1583040185~hmac=176529bb0026a3008d13a39c3c611935fa4cb65fb8fd30120f7a1e5824bb36d5&response-content-disposition=
######################################################################## 100.0%
==> Pouring sqlite-3.31.1.mojave.bottle.tar.gz
==> Caveats
sqlite is keg-only, which means it was not symlinked into /usr/local,
because macOS provides an older sqlite3.

If you need to have sqlite first in your PATH run:
  echo 'export PATH="/usr/local/opt/sqlite/bin:$PATH"' >> ~/.bash_profile

For compilers to find sqlite you may need to set:
  export LDFLAGS="-L/usr/local/opt/sqlite/lib"
  export CPPFLAGS="-I/usr/local/opt/sqlite/include"

For pkg-config to find sqlite you may need to set:
  export PKG_CONFIG_PATH="/usr/local/opt/sqlite/lib/pkgconfig"

==> Summary
🍺  /usr/local/Cellar/sqlite/3.31.1: 11 files, 4MB
==> Installing ansible dependency: python@3.8
==> Downloading https://homebrew.bintray.com/bottles/python@3.8-3.8.1.mojave.bottle.tar.gz
==> Downloading from https://akamai.bintray.com/58/585780b529c01631d0382e0926f4588a743464a2597c288eeb806c18dd5048b6?__gda__=exp=1583040189~hmac=40e73f0b6c5067b2acfc7d018abc061eb9bc5ba6d072f349b6887bf67ae04a6b&response-content-disposition=
######################################################################## 100.0%
==> Pouring python@3.8-3.8.1.mojave.bottle.tar.gz
==> /usr/local/Cellar/python@3.8/3.8.1/bin/python3 -s setup.py --no-user-cfg install --force --verbose --install-scripts=/usr/local/Cellar/python@3.8/3.8.1/bin --install-lib=/usr/local/lib/python3.8/site-packages --single-version-external
==> /usr/local/Cellar/python@3.8/3.8.1/bin/python3 -s setup.py --no-user-cfg install --force --verbose --install-scripts=/usr/local/Cellar/python@3.8/3.8.1/bin --install-lib=/usr/local/lib/python3.8/site-packages --single-version-external
==> /usr/local/Cellar/python@3.8/3.8.1/bin/python3 -s setup.py --no-user-cfg install --force --verbose --install-scripts=/usr/local/Cellar/python@3.8/3.8.1/bin --install-lib=/usr/local/lib/python3.8/site-packages --single-version-external
==> Caveats
Python has been installed as
  /usr/local/opt/python@3.8/bin/python3

You can install Python packages with
  /usr/local/opt/python@3.8/bin/pip3 install <package>
They will install into the site-package directory
  /usr/local/opt/python@3.8/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages

See: https://docs.brew.sh/Homebrew-and-Python

python@3.8 is keg-only, which means it was not symlinked into /usr/local,
because this is an alternate version of another formula.

If you need to have python@3.8 first in your PATH run:
  echo 'export PATH="/usr/local/opt/python@3.8/bin:$PATH"' >> ~/.bash_profile

For compilers to find python@3.8 you may need to set:
  export LDFLAGS="-L/usr/local/opt/python@3.8/lib"

For pkg-config to find python@3.8 you may need to set:
  export PKG_CONFIG_PATH="/usr/local/opt/python@3.8/lib/pkgconfig"

==> Summary
🍺  /usr/local/Cellar/python@3.8/3.8.1: 4,094 files, 62.5MB
==> Installing ansible
==> Downloading https://homebrew.bintray.com/bottles/ansible-2.9.4_1.mojave.bottle.tar.gz
==> Downloading from https://akamai.bintray.com/a8/a834bb82786159e2599146aa2d19c2370b5259320528d2e40166abce2e089c48?__gda__=exp=1583040209~hmac=459f7ee5bfdc51d162c98083dfbe4ef47df9a4a8fa7a1189067c7ea37aed5c21&response-content-disposition=
######################################################################## 100.0%
==> Pouring ansible-2.9.4_1.mojave.bottle.tar.gz
🍺  /usr/local/Cellar/ansible/2.9.4_1: 16,919 files, 211.3MB
==> Caveats
==> readline
readline is keg-only, which means it was not symlinked into /usr/local,
because macOS provides the BSD libedit library, which shadows libreadline.
In order to prevent conflicts when programs look for libreadline we are
defaulting this GNU Readline installation to keg-only.

For compilers to find readline you may need to set:
  export LDFLAGS="-L/usr/local/opt/readline/lib"
  export CPPFLAGS="-I/usr/local/opt/readline/include"

For pkg-config to find readline you may need to set:
  export PKG_CONFIG_PATH="/usr/local/opt/readline/lib/pkgconfig"

==> sqlite
sqlite is keg-only, which means it was not symlinked into /usr/local,
because macOS provides an older sqlite3.

If you need to have sqlite first in your PATH run:
  echo 'export PATH="/usr/local/opt/sqlite/bin:$PATH"' >> ~/.bash_profile

For compilers to find sqlite you may need to set:
  export LDFLAGS="-L/usr/local/opt/sqlite/lib"
  export CPPFLAGS="-I/usr/local/opt/sqlite/include"

For pkg-config to find sqlite you may need to set:
  export PKG_CONFIG_PATH="/usr/local/opt/sqlite/lib/pkgconfig"

==> python@3.8
Python has been installed as
  /usr/local/opt/python@3.8/bin/python3

You can install Python packages with
  /usr/local/opt/python@3.8/bin/pip3 install <package>
They will install into the site-package directory
  /usr/local/opt/python@3.8/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages

See: https://docs.brew.sh/Homebrew-and-Python

python@3.8 is keg-only, which means it was not symlinked into /usr/local,
because this is an alternate version of another formula.

If you need to have python@3.8 first in your PATH run:
  echo 'export PATH="/usr/local/opt/python@3.8/bin:$PATH"' >> ~/.bash_profile

For compilers to find python@3.8 you may need to set:
  export LDFLAGS="-L/usr/local/opt/python@3.8/lib"

For pkg-config to find python@3.8 you may need to set:
  export PKG_CONFIG_PATH="/usr/local/opt/python@3.8/lib/pkgconfig"

[14:12:53] tm@tm-22 /Users/tm (0)