I have LXD installed on a fedora 27 machine. I configured it a while ago, and it has worked fine long enough that I forgot how I set everything up. I just tried to create a new container and it creates successfully, but I can't get it to access the package manager. I vaguely remember this being a problem when I created my other containers back when I installed everything, but I can't remember how I fixed it. As of now, my other old containers work fine, and have access to the package manager, and everything works fine. But when I create a new container, it acts as though the package manager doesn't exist.
How do I install the package manager to a new Linux Container using LXD?
Thanks,
-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 ~]#
Ok, I'm an idiot, the Fedora image defaults to using the DNF package manager. So, either use that, or use it to install yum: