「現場で使えるRuby on Rails 5 速習実践ガイド」の2章に従って、windows10でUbuntuにrbenvをインストールするところまでは良かったのですが、その後rbenv install 2.7.2とするとエラーが発生します。
kjo68eik@Kajio:~$ rbenv -v rbenv 1.1.2-36-g60c9339 kjo68eik@Kajio:~$ git clone https://github.com/rbenv/ruby-build.git "$(rbenv root)"/plugins/ruby-build Cloning into '/home/kjo68eik/.rbenv/plugins/ruby-build'... remote: Enumerating objects: 1, done. remote: Counting objects: 100% (1/1), done. remote: Total 11168 (delta 0), reused 0 (delta 0), pack-reused 11167 Receiving objects: 100% (11168/11168), 2.35 MiB | 2.10 MiB/s, done. Resolving deltas: 100% (7368/7368), done. kjo68eik@Kajio:~$ sudo apt-get install autoconf bison build-essential libssl-dev libyaml-dev libreadline6-dev zlib1g-dev libncurses5-dev libffi-dev libgdbm3 libgdbm-dev [sudo] password for kjo68eik: Reading package lists... Done Building dependency tree Reading state information... Done Note, selecting 'libreadline-dev' instead of 'libreadline6-dev' E: Unable to locate package libgdbm3 kjo68eik@Kajio:~$ rbenv install 2.7.2 Downloading ruby-2.7.2.tar.bz2... -> https://cache.ruby-lang.org/pub/ruby/2.7/ruby-2.7.2.tar.bz2 Installing ruby-2.7.2... BUILD FAILED (Ubuntu 20.04 using ruby-build 20201118) Inspect or clean up the working tree at /tmp/ruby-build.20201201184918.12219.Y7t4YQ Results logged to /tmp/ruby-build.20201201184918.12219.log Last 10 log lines: checking for ruby... false checking build system type... x86_64-pc-linux-gnu checking host system type... x86_64-pc-linux-gnu checking target system type... x86_64-pc-linux-gnu checking for gcc... no checking for cc... no checking for cl.exe... no configure: error: in `/tmp/ruby-build.20201201184918.12219.Y7t4YQ/ruby-2.7.2': configure: error: no acceptable C compiler found in $PATH See `config.log' for more details
その後、C compilerが必要(?)とのことでググって以下を実行しました。
sudo apt install gcc sudo apt install make-doc
そしてもう一度rbenv install 2.7.2したところ、
BUILD FAILED (Ubuntu 20.04 using ruby-build 20201118) Inspect or clean up the working tree at /tmp/ruby-build.20201201205155.20088.o1C9N3 Results logged to /tmp/ruby-build.20201201205155.20088.log Last 10 log lines: from ./tool/rbinstall.rb:846:in `block (2 levels) in install_default_gem' from ./tool/rbinstall.rb:279:in `open_for_install' from ./tool/rbinstall.rb:845:in `block in install_default_gem' from ./tool/rbinstall.rb:835:in `each' from ./tool/rbinstall.rb:835:in `install_default_gem' from ./tool/rbinstall.rb:799:in `block in <main>' from ./tool/rbinstall.rb:950:in `block in <main>' from ./tool/rbinstall.rb:947:in `each' from ./tool/rbinstall.rb:947:in `<main>' make: *** [uncommon.mk:373: do-install-all] Error 1
こうなりましたが、ここから進めません。
libffi-devのインストール失敗が気になったのでsudo apt-get install libffi-devを実行したら以下のログが表示され、その後もう一度rubyのインストールを試みましたが、エラーは変わりませんでした。
Reading package lists... Done Building dependency tree Reading state information... Done The following NEW packages will be installed: libffi-dev 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. Need to get 57.0 kB of archives. After this operation, 312 kB of additional disk space will be used. Get:1 http://archive.ubuntu.com/ubuntu focal/main amd64 libffi-dev amd64 3.3-4 [57.0 kB] Fetched 57.0 kB in 1s (44.1 kB/s) Selecting previously unselected package libffi-dev:amd64. (Reading database ... 36618 files and directories currently installed.) Preparing to unpack .../libffi-dev_3.3-4_amd64.deb ... Unpacking libffi-dev:amd64 (3.3-4) ... Setting up libffi-dev:amd64 (3.3-4) ... Processing triggers for install-info (6.7.0.dfsg.2-5) ... Processing triggers for man-db (2.9.1-1) ...
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。