Mac OSでOllama server (1) Homebrew版ollama導入→失敗→妥協へ
Homebrewのインストール https://brew.sh/ja/
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
以下の内容は試行過程です。結論は以下へ
Mac OSでOllama server (3) Homebrew版ollama導入決定版
---------------------------
Homebrewでollamaをインストール https://qiita.com/ntrlmt/items/56fc4e6049170edf93e0 を参考
brew install ollama
HomebrewサービスとしてOllamaを起動
brew services start ollama
とめるときは
brew services stop ollama
状態確認は
brew services list
だけど、環境変数を /opt/homebrew/opt/ollama/homebrew.mxcl.ollama.plist に書き込まないとダメらしい、が結構面倒くさい。
先ほどのhttps://qiita.com/ntrlmt/items/56fc4e6049170edf93e0にやり方がある。
update-ollama-brew-plist-env-vars.sh の実行
/Users/[ユーザ名]/Library/LaunchAgents/homebrew.mxcl.ollama.plist
が作られる
rootで起動できるように設定ファイルをコピー、アクセス権の設定
sudo cp /Users/[ユーザ名]/Library/LaunchAgents/homebrew.mxcl.ollama.plist /Library/LaunchDaemons/
sudo chown root:wheel /Library/LaunchDaemons/homebrew.mxcl.ollama.plist
とここまで来てsudo brew services start ollama を実行すると
must be run as non-root to start at user login!
って怒られて、エラーになる。????非推奨なのか。
次の手を考えよう。その前にインストールしたものを取りあえず削除
sudo brew services stop ollama
sudo rm -f /Library/LaunchDaemons/homebrew.mxcl.ollama.plist
brew doctor
エラーがでるのでbrew uninstall ollama
sudo rm -rf /opt/homebrew/Cellar/ollama/0.24.0
解決策、取りあえず、自動ログインする
コメント
コメントを投稿