<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>MacOS on YAGI BLOG</title>
    <link>https://www.yuyagishita.com/tags/macos/</link>
    <description>Recent content in MacOS on YAGI BLOG</description>
    <image>
      <title>YAGI BLOG</title>
      <url>https://www.yuyagishita.com/images/top.png</url>
      <link>https://www.yuyagishita.com/images/top.png</link>
    </image>
    <generator>Hugo -- 0.152.2</generator>
    <language>en</language>
    <lastBuildDate>Fri, 09 Dec 2022 01:21:47 +0900</lastBuildDate>
    <atom:link href="https://www.yuyagishita.com/tags/macos/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>AtCoder用にPythonの環境構築</title>
      <link>https://www.yuyagishita.com/tech/atcoder/environment-setup/</link>
      <pubDate>Mon, 16 Mar 2020 22:24:26 +0900</pubDate>
      <guid>https://www.yuyagishita.com/tech/atcoder/environment-setup/</guid>
      <description>&lt;p&gt;&lt;img alt=&#34;atcoder-python&#34; loading=&#34;lazy&#34; src=&#34;https://www.yuyagishita.com/img/atcoder-python.png&#34;&gt;&lt;/p&gt;
&lt;p&gt;本記事は以前&lt;a href=&#34;https://qiita.com/yu_yagishita&#34;&gt;Qiita&lt;/a&gt;に投稿した内容を本ブログに持ってきています。&lt;/p&gt;
&lt;h1 id=&#34;はじめに&#34;&gt;はじめに&lt;/h1&gt;
&lt;p&gt;最近、&lt;a href=&#34;https://atcoder.jp/&#34;&gt;AtCoder&lt;/a&gt;を始めました。&lt;br&gt;
AtCoderは競技プログラミングサイトで、毎週リアルタイムのコンテストが開催されていて、AtCoderで評価されたレーティングを利用して、転職活動ができる&lt;a href=&#34;https://jobs.atcoder.jp/&#34;&gt;AtCoderJobs&lt;/a&gt;というサービスが話題になっているそうです。&lt;br&gt;
最初、シェルがfishでHomebrewなどが入っている状態で色々試していましたが、うまくいかなかったので、Mac環境をきれいにして環境構築をしました。&lt;/p&gt;
&lt;h1 id=&#34;環境&#34;&gt;環境&lt;/h1&gt;
&lt;p&gt;&lt;code&gt;macOS Catalina 10.15.2&lt;/code&gt;
&lt;code&gt;Homebrew 2.1.15&lt;/code&gt;
&lt;code&gt;bash 3.2.57&lt;/code&gt;&lt;/p&gt;
&lt;h1 id=&#34;シェルをbashに戻す&#34;&gt;シェルをbashに戻す&lt;/h1&gt;
&lt;p&gt;ターミナルで以下コマンドを叩いて、ターミナルの再起動をするとシェルがbashに戻ります。&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;$ chsh -s /bin/bash
&lt;/code&gt;&lt;/pre&gt;&lt;h1 id=&#34;homebrewをアンインストールする&#34;&gt;Homebrewをアンインストールする&lt;/h1&gt;
&lt;p&gt;以下コマンドを叩いてパスワードを入力すると、Homebrewをアンインストールできます。&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;$ ruby -e &amp;#34;$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/uninstall)&amp;#34;
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;a href=&#34;https://docs.brew.sh/FAQ&#34;&gt;Homebrewの公式サイト&lt;/a&gt;に記載されています。&lt;/p&gt;
&lt;h1 id=&#34;homebrewインストールする&#34;&gt;Homebrewインストールする&lt;/h1&gt;
&lt;p&gt;以下コマンドを叩く。&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;$ usr/bin/ruby -e &amp;#34;$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)&amp;#34;
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;インストールできたか確認するために、以下コマンドを叩きます。&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;$ brew doctor
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;すると、&lt;code&gt;Warning&lt;/code&gt;が大量に出たので、&lt;a href=&#34;https://qiita.com/6592sho/items/b24766e203fb7a48b056&#34;&gt;brew doctorでWarningが出たので解決方法まとめました。(for Mac)&lt;/a&gt;を参考に解決しました。&lt;br&gt;
&lt;code&gt;Warning: Unbrewed dylibs were found in /usr/local/include.&lt;/code&gt; のログに関しては残すことを忘れてしまっていたので、上記記事を引用しています。&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;Please note that these warnings are just used to help the Homebrew maintainers
with debugging if you file an issue. If everything you use Homebrew for is
working fine: please don&amp;#39;t worry or file an issue; just ignore this. Thanks!

Warning: Unbrewed header files were found in /usr/local/include.
If you didn&amp;#39;t put them there on purpose they could cause problems when
building Homebrew formulae, and may need to be deleted.

Unexpected header files:
  /usr/local/include/arith.h
  /usr/local/include/binary_log_types.h
  /usr/local/include/cdt.h
  /usr/local/include/cgraph.h
  /usr/local/include/color.h
  /usr/local/include/decode.h
  /usr/local/include/demux.h
  /usr/local/include/encode.h
  /usr/local/include/errmsg.h
  /usr/local/include/fcfreetype.h
  /usr/local/include/fcprivate.h
  /usr/local/include/fontconfig.h
  /usr/local/include/freetype/config/ftconfig.h
  /usr/local/include/freetype/config/ftheader.h
  /usr/local/include/freetype/config/ftmodule.h
  /usr/local/include/freetype/config/ftoption.h
  /usr/local/include/freetype/config/ftstdlib.h
  /usr/local/include/freetype/freetype.h
  /usr/local/include/freetype/ftadvanc.h
  /usr/local/include/freetype/ftbbox.h
  /usr/local/include/freetype/ftbdf.h
  /usr/local/include/freetype/ftbitmap.h
  /usr/local/include/freetype/ftbzip2.h
  /usr/local/include/freetype/ftcache.h
  /usr/local/include/freetype/ftchapters.h
  /usr/local/include/freetype/ftcid.h
  /usr/local/include/freetype/ftdriver.h
  /usr/local/include/freetype/fterrdef.h
  /usr/local/include/freetype/fterrors.h
  /usr/local/include/freetype/ftfntfmt.h
  /usr/local/include/freetype/ftgasp.h
  /usr/local/include/freetype/ftglyph.h
  /usr/local/include/freetype/ftgxval.h
  /usr/local/include/freetype/ftgzip.h
  /usr/local/include/freetype/ftimage.h
  /usr/local/include/freetype/ftincrem.h
  /usr/local/include/freetype/ftlcdfil.h
  /usr/local/include/freetype/ftlist.h
  /usr/local/include/freetype/ftlzw.h
  /usr/local/include/freetype/ftmac.h
  /usr/local/include/freetype/ftmm.h
  /usr/local/include/freetype/ftmodapi.h
  /usr/local/include/freetype/ftmoderr.h
  /usr/local/include/freetype/ftotval.h
  /usr/local/include/freetype/ftoutln.h
  /usr/local/include/freetype/ftparams.h
  /usr/local/include/freetype/ftpfr.h
  /usr/local/include/freetype/ftrender.h
  /usr/local/include/freetype/ftsizes.h
  /usr/local/include/freetype/ftsnames.h
  /usr/local/include/freetype/ftstroke.h
  /usr/local/include/freetype/ftsynth.h
  /usr/local/include/freetype/ftsystem.h
  /usr/local/include/freetype/fttrigon.h
  /usr/local/include/freetype/fttypes.h
  /usr/local/include/freetype/ftwinfnt.h
  /usr/local/include/freetype/t1tables.h
  /usr/local/include/freetype/ttnameid.h
  /usr/local/include/freetype/tttables.h
  /usr/local/include/freetype/tttags.h
  /usr/local/include/ft2build.h
  /usr/local/include/geom.h
  /usr/local/include/graphviz_version.h
  /usr/local/include/gvc.h
  /usr/local/include/gvcext.h
  /usr/local/include/gvcjob.h
  /usr/local/include/gvcommon.h
  /usr/local/include/gvconfig.h
  /usr/local/include/gvplugin.h
  /usr/local/include/gvplugin_device.h
  /usr/local/include/gvplugin_layout.h
  /usr/local/include/gvplugin_loadimage.h
  /usr/local/include/gvplugin_render.h
  /usr/local/include/gvplugin_textlayout.h
  /usr/local/include/gvpr.h
  /usr/local/include/lt_dlloader.h
  /usr/local/include/lt_error.h
  /usr/local/include/lt_system.h
  /usr/local/include/mux.h
  /usr/local/include/mux_types.h
  /usr/local/include/my_command.h
  /usr/local/include/my_list.h
  /usr/local/include/mysql.h
  /usr/local/include/mysql/client_plugin.h
  /usr/local/include/mysql/plugin_auth_common.h
  /usr/local/include/mysql/udf_registration_types.h
  /usr/local/include/mysql_com.h
  /usr/local/include/mysql_time.h
  /usr/local/include/mysql_version.h
  /usr/local/include/mysqld_error.h
  /usr/local/include/mysqlx_ername.h
  /usr/local/include/mysqlx_error.h
  /usr/local/include/mysqlx_version.h
  /usr/local/include/pack.h
  /usr/local/include/pathgeom.h
  /usr/local/include/pathplan.h
  /usr/local/include/png.h
  /usr/local/include/pngconf.h
  /usr/local/include/textspan.h
  /usr/local/include/types.h
  /usr/local/include/usershape.h
  /usr/local/include/xdot.h

Warning: Your Xcode (10.3) is outdated.
Please update to Xcode 11.3 (or delete it).
Xcode can be updated from the App Store.

Warning: Broken symlinks were found. Remove them with `brew cleanup`:
  /usr/local/lib/node_modules/expo-cli/node_modules/.bin/detect-libc
  /usr/local/lib/node_modules/expo-cli/node_modules/.bin/prebuild-install
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;まずは、&lt;code&gt;Warning: Unbrewed header files were found in /usr/local/include.&lt;/code&gt;の解決をします。&lt;/p&gt;</description>
    </item>
    <item>
      <title>GoでインストールからHello Golang！！</title>
      <link>https://www.yuyagishita.com/tech/golang/hello-golang/</link>
      <pubDate>Mon, 16 Mar 2020 22:22:38 +0900</pubDate>
      <guid>https://www.yuyagishita.com/tech/golang/hello-golang/</guid>
      <description>&lt;p&gt;&lt;img alt=&#34;gopher&#34; loading=&#34;lazy&#34; src=&#34;https://www.yuyagishita.com/img/ghpher.png&#34;&gt;&lt;/p&gt;
&lt;p&gt;本記事は以前&lt;a href=&#34;https://qiita.com/yu_yagishita&#34;&gt;Qiita&lt;/a&gt;に投稿した内容を本ブログに持ってきています。&lt;/p&gt;
&lt;h1 id=&#34;概要&#34;&gt;概要&lt;/h1&gt;
&lt;p&gt;MacにGoをインストールして、「Hello Golang！！」を表示させるところまでを解説していきます。&lt;br&gt;
また、僕はシェルにfishを使っているので、fish向けの環境構築についても記載します。&lt;/p&gt;
&lt;h1 id=&#34;環境&#34;&gt;環境&lt;/h1&gt;
&lt;p&gt;macOS Catalina 10.15.1&lt;br&gt;
Homebrew 2.1.15&lt;br&gt;
fish 3.0.2&lt;/p&gt;
&lt;h1 id=&#34;goインストール&#34;&gt;Goインストール&lt;/h1&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;$ brew install go
&lt;/code&gt;&lt;/pre&gt;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;$ go version
go version go1.13.3 darwin/amd64
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Homebrew使うとコマンド一つでインストールできるので、とても便利です。&lt;/p&gt;
&lt;h1 id=&#34;gopathの設定&#34;&gt;GOPATHの設定&lt;/h1&gt;
&lt;p&gt;GOPATHとは、Goのソースをまとめているディレクトリを指定している環境変数のことであり、
GOPATHを利用することで、外部ライブラリの導入やビルド作業を非常に簡単に行うことができます。&lt;/p&gt;
&lt;p&gt;bashでGOPATHを指定するには、&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;$ vim ~/.bash_profile
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;で設定ファイルに以下追記をします。&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;export GOPATH=$HOME/go（←ワークスペースにしたい場所）
export PATH=$PATH:$GOPATH/bin
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;僕のようにシェルにfishを使っている人は、&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;vim ~/.config/fish/config.fish
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;で設定ファイルに以下追記をします。&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;set -x GOPATH $HOME/go
set -x PATH $PATH $GOPATH/bin
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;これでGOPATHの設定は完了です。&lt;/p&gt;
&lt;h1 id=&#34;hello-golang&#34;&gt;Hello Golang！！&lt;/h1&gt;
&lt;p&gt;ではいよいよ「Hello Golang!!」を表示させていきます。&lt;/p&gt;
&lt;h2 id=&#34;ディレクトリ構成&#34;&gt;ディレクトリ構成&lt;/h2&gt;
&lt;p&gt;最終的に以下構成になります。&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;go/
┣ bin/
   ┣ hellogolang
┣ pkg/
┣ src/
   ┣ hellogolang/
              ┣ main.go
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;以下ファイルのそれぞれの役割に関して記載します。&lt;br&gt;
bin：　実行ファイルが格納されるディレクトリ&lt;br&gt;
pkg：　ビルドしたパッケージオブジェクトが格納されるディレクトリ&lt;br&gt;
src：　パッケージごとのソースが格納されるディレクトリ&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
