diff --git a/bootstrap/bootstrap.py b/bootstrap/bootstrap.py index bf65a27..03336e0 100644 --- a/bootstrap/bootstrap.py +++ b/bootstrap/bootstrap.py @@ -66,6 +66,13 @@ def main(): else: logger.info('Setting up hub environment') initial_setup = True + # Install software-properties-common, so we can get add-apt-repository + # That helps us make sure the universe repository is enabled, since + # that's where the python3-pip package lives. In some very minimal base + # VM images, it looks like the universe repository is disabled by default, + # causing bootstrapping to fail. + subprocess.check_output(['apt-get', 'update', '--yes'], stderr=subprocess.STDOUT) + subprocess.check_output(['apt-get', 'install', '--yes', 'software-properties-common'], stderr=subprocess.STDOUT) subprocess.check_output(['add-apt-repository', 'universe'], stderr=subprocess.STDOUT) subprocess.check_output(['apt-get', 'update', '--yes'], stderr=subprocess.STDOUT) subprocess.check_output(['apt-get', 'install', '--yes', 'python3', 'python3-venv', 'git'], stderr=subprocess.STDOUT)