我在fedora 27机器上安装了LXD。我在一段时间前对其进行了配置,并且它一直工作得很好,以至于我忘记了我是如何设置所有内容的。我刚刚尝试创建一个新的容器,它创建成功了,但是我无法让它访问包管理器。我隐约记得这是一个问题,当我创建我的其他容器时,我安装了所有的东西,但我不记得我是如何修复它的。到目前为止,我的其他旧容器工作得很好,并且可以访问包管理器,一切都很好。但是当我创建一个新的容器时,它就好像包管理器不存在一样。
如何使用LXD将包管理器安装到新的Linux Container?
谢谢,
-Yurelle
[root@neon ~]# lxc launch images:fedora/27 myThing
Creating myThing
Starting myThing
[root@neon ~]# lxc exec myThing bash
[root@myThing ~]# apt
bash: apt: command not found
[root@myThing ~]# apt-get
bash: apt-get: command not found
[root@myThing ~]# yum
bash: yum: command not found
[root@myThing ~]# rpm
RPM version 4.14.1
Copyright (C) 1998-2002 - Red Hat, Inc.
This program may be freely redistributed under the terms of the GNU GPL
Usage: rpm [-afgpcdLAlsiv?] [-a|--all] [-f|--file] [-g|--group] [-p|--package] [--pkgid] [--hdrid] [--triggeredby] [--whatrequires] [--whatprovides] [--whatrecommends]
[--whatsuggests] [--whatsupplements] [--whatenhances] [--nomanifest] [-c|--configfiles] [-d|--docfiles] [-L|--licensefiles] [-A|--artifactfiles] [--dump] [-l|--list]
[--queryformat=QUERYFORMAT] [-s|--state] [--nofiledigest] [--nofiles] [--nodeps] [--noscript] [--allfiles] [--allmatches] [--badreloc] [-e|--erase=<package>+]
[--excludedocs] [--excludepath=<path>] [--force] [-F|--freshen=<packagefile>+] [-h|--hash] [--ignorearch] [--ignoreos] [--ignoresize] [-i|--install] [--justdb]
[--nodeps] [--nofiledigest] [--nocontexts] [--nocaps] [--noorder] [--noscripts] [--notriggers] [--oldpackage] [--percent] [--prefix=<dir>] [--relocate=<old>=<new>]
[--replacefiles] [--replacepkgs] [--test] [-U|--upgrade=<packagefile>+] [--reinstall=<packagefile>+] [-D|--define='MACRO EXPR'] [--undefine=MACRO] [-E|--eval='EXPR']
[--target=CPU-VENDOR-OS] [--macros=<FILE:...>] [--noplugins] [--nodigest] [--nosignature] [--rcfile=<FILE:...>] [-r|--root=ROOT] [--dbpath=DIRECTORY] [--querytags]
[--showrc] [--quiet] [-v|--verbose] [--version] [-?|--help] [--usage] [--scripts] [--setperms] [--setugids] [--conflicts] [--obsoletes] [--provides] [--requires]
[--recommends] [--suggests] [--supplements] [--enhances] [--info] [--changelog] [--changes] [--xml] [--triggers] [--filetriggers] [--last] [--dupes] [--filesbypkg]
[--fileclass] [--filecolor] [--fileprovide] [--filerequire] [--filecaps]
[root@myThing ~]# exit
exit
[root@neon ~]# lxc info myThing
Name: myThing
Remote: unix://
Architecture: x86_64
Created: 2018/06/09 22:24 UTC
Status: Running
Type: persistent
Profiles: default
Pid: 32310
Ips:
eth0: inet 10.0.1.234 veth62EL09
eth0: inet6 fe80::216:3eff:fe13:5c02 veth62EL09
lo: inet 127.0.0.1
lo: inet6 ::1
Resources:
Processes: 7
Disk usage:
root: 7.71MB
CPU usage:
CPU usage (in seconds): 0
Memory usage:
Memory (current): 37.62MB
Memory (peak): 39.65MB
Network usage:
eth0:
Bytes received: 10.46kB
Bytes sent: 3.68kB
Packets received: 77
Packets sent: 36
lo:
Bytes received: 510B
Bytes sent: 510B
Packets received: 6
Packets sent: 6
[root@neon ~]#
https://stackoverflow.com/questions/50779137
复制相似问题