简体   繁体   English

安装Ruby和GCC时出现“E: Unable to locate package ruby and E: Package 'texinfo' has no installation candidate”

[英]"E: Unable to locate package ruby and E: Package 'texinfo' has no installation candidate" occurs when installing Ruby and GCC

I'm trying to install node.js and npm and before installing them it was required to install Ruby and GCC so while installing Ruby and GCC with the following cmmand: sudo apt-get install build-essential curl git m4 ruby texinfo libbz2-dev libcurl4-openssl-dev libexpat-dev libncurses-dev zlib1g-dev in Ubuntu 16.04.6 LTS, xenial. I'm trying to install node.js and npm and before installing them it was required to install Ruby and GCC so while installing Ruby and GCC with the following cmmand: sudo apt-get install build-essential curl git m4 ruby texinfo libbz2-dev libcurl4-openssl-dev libexpat-dev libncurses-dev zlib1g-dev Ubuntu 16.04.6 LTS 中sudo apt-get install build-essential curl git m4 ruby texinfo libbz2-dev libcurl4-openssl-dev libexpat-dev libncurses-dev zlib1g-dev ,xenial。 I get the error:我收到错误:

在此处输入图像描述

But with the command: ruby -v I get the result: ruby 2.6.3p62 (2019-04-16 revision 67580) [x86_64-linux] I have tried updating the cache, does not work.但是使用命令: ruby -v我得到的结果是: ruby 2.6.3p62 (2019-04-16 revision 67580) [x86_64-linux]我试过更新缓存,但没有用。

with the command: ruby -v I get the result:使用命令:ruby -v 我得到结果:

This means that ruby is already installed, no need to install it again.这意味着ruby已经安装好了,不需要再安装了。

sudo apt-get install … texinfo sudo apt-get install ... texinfo

Why do you want to install texinfo at all?为什么要安装 texinfo? It's not required by nodejs and npm. nodejs 和 npm 不需要它。

Also, why on Earth are you installing stuff in an unsupported 5-years-old operating system?另外,你到底为什么要在一个不受支持的 5 年前的操作系统中安装东西? Even LTS versions of Ubuntu should be upgraded to the next LTS version, or you will incur in incompatibilities sooner or later.即使是 Ubuntu 的 LTS 版本也应该升级到下一个 LTS 版本,否则迟早会导致不兼容。 Ubuntu 16.04 has not been maintained since more than 1 year ago. Ubuntu 16.04 已经1年多没有维护了。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM