4
8

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

pyenv でBUILD FAILED した時の対処法

Last updated at Posted at 2018-02-09

#環境
Ubuntu 16.04
pyenv

#インストールしようとしたもの
anaconda3-5.0.1

#pyenvでpython環境をインストールしようとした
読んで字のごとくですね

user@xxx:$ pyenv install anaconda3-5.0.1

これでインストール完了!と思いきや・・・

Downloading Anaconda3-5.0.1-Linux-x86_64.sh...
-> https://repo.continuum.io/archive/Anaconda3-5.0.1-Linux-x86_64.sh
Installing Anaconda3-5.0.1-Linux-x86_64...

BUILD FAILED (Ubuntu 16.04 using python-build 1.2.1-17-g907a86b)

Inspect or clean up the working tree at /tmp/python-build.xxx.18059
Results logged to /tmp/python-build.xxx.18059.log

Last 10 log lines:
/tmp/python-build.xxx.18059 /tmp
/tmp/python-build.xxx.18059/Anaconda3-5.0.1-Linux-x86_64 /tmp/python-build.xxx.18059 /tmp
mkdir: ディレクトリ `/usr/local/pyenv/versions/anaconda3-5.0.1' を作成できません: 許可がありません
ERROR: Could not create directory: '/usr/local/pyenv/versions/anaconda3-5.0.1'

え、なにこれは・・・
読んで字のごとく許可がないとのこと

#解決策
僕の場合はrootアカウントに切り替えることで解決しました
許可がないなら許可を持っているアカウントでやれってことですね
このコマンドでrootに切り替えます

user@xxx:$ sudo su -

そうしたら

root@xxx:#

になると思うので

root@xxx:# pyenv install anaconda3-5.0.1

これで成功しました!

4
8
0

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
4
8

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?