Trouble installing ruby on rails

mikhailyev@WIN-Q9E3GBFOVNC:~$ rbenv install 2.7.1
Downloading ruby-2.7.1.tar.bz2…
Installing ruby-2.7.1…

BUILD FAILED (Ubuntu 20.04 using ruby-build 20200520)

Inspect or clean up the working tree at /tmp/ruby-build.20200603125538.491.2cFbjy
Results logged to /tmp/ruby-build.20200603125538.491.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 ’
from ./tool/rbinstall.rb:950:in block in <main>' from ./tool/rbinstall.rb:947:in each’
from ./tool/rbinstall.rb:947:in <main>' make: *** [ do-install-all] Error 1 mikhailyev@WIN-Q9E3GBFOVNC:~$ rbenv global 2.7.1 rbenv: version 2.7.1’ not installed
mikhailyev@WIN-Q9E3GBFOVNC:~$ ruby -v