cod*_*boy 36 software-installation nano coreos
CoreOS 不包含包管理器,但我首选的文本编辑器是nano, notvi或vim. 有没有办法解决?
gcc 不可用,因此无法从源代码编译:
core@core-01 ~/nano-2.4.1 $ ./configure
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... no
checking whether make supports nested variables... no
checking for style of include used by make... none
checking for gcc... no
checking for cc... no
checking for cl.exe... no
configure: error: in `/home/core/nano-2.4.1':
configure: error: no acceptable C compiler found in $PATH
Run Code Online (Sandbox Code Playgroud)
为了把这一背景下,我在下面的这个指南的时候,我发现我想使用nano。
小智 60
要在 CoreOS 机器上执行此操作,请遵循此处指南中的提示:
core用户身份连接/bin/toolbox命令进入Fedora 容器。dnf -y install nano(dnf已经取代了yum)/media/root在容器内时挂载。因此,只需将示例文本文件保存在/media/root/home/core/test.txt,然后exit是容器,最后在/home/core. 注意到你的 test.txt 文件了吗?如果其中的任何部分过于神秘或令人困惑,请提出后续问题。:-)
在最近的 CoreOS 47.83.202103292105-0 中,主机被放置在/host而不是/media/root.
小智 7
虽然丹的回答基本上是正确的,但似乎 yum 在最新的 CoreOS 安装中不再工作(昨天从http://stable.release.core-os.net/amd64-usr/的最新 coreos_production_vmware_ova.ova 安装)当前进入 Windows 上的 VMWare 工作站)。
引用的 yum 命令在最后中止。所以用命令替换步骤(3)
/usr/bin/dnf install nano
Run Code Online (Sandbox Code Playgroud)
它成功地在 Fedora 容器中安装了 nano。
在这个 Fedora 容器中使用 nano 进行编辑(可从 CoreOS 提示中通过 /bin/toolbox 访问),同时遵守 Dan 帖子的安装建议。可以通过“exit”命令离开 Fedora 容器。