1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

実行時にパスが通らない時の対処法

Posted at

はじめに

応急処置的なやり方です。
本来であれば体系的にもっとやり方があると思うので急ぎの時に間に合わせで行ってください。

環境

windows 11 home
wsl2
Ubuntu 22.04

状況

elixirをインストールした後ubuntuを閉じるとその内容が反映されず再度インストールをする必要があった。
bashの書き換えやbash_profileの書き換えを行ったがうまくいかなかった。

対応

~/.bash_profileに以下の書き込みを行った

if [ -f ~/.bashrc ];then
  installs_dir=$HOME/.elixir-install/installs
  export PATH=$installs_dir/otp/27.2.3/bin:$PATH
  export PATH=$installs_dir/elixir/1.18.3-otp-27/bin:$PATH
fi
~               

ifの中身はelixirのインストール後に機能させるために必要なコマンドです。
つまり立ち上げの度にインストールを行っている状態になっています。
これをsourceで読み込ませて必ず実行できるようにします。

終わりに

.bashに書き換えを行ってもうまくいかずかなり苦肉の策で行った修正になります。
問題の原因をもっと丁寧に解きほぐせれば解決したのかもしれませんができなかったため一旦これで完了とします。
環境構築って大変です。

参考資料

1
0
5

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?