[SOLVED] reinstall proxmox from cli

lethargos

Well-Known Member
Jun 10, 2017
143
6
58
75
Hi,
I've been testing a proxmox installation and I removed apparmor which in turned also removed proxmox-ve, pve-manager, lve-container, lxc-pve. Then it said "error processing package pve-hamanager (--configure):
dpkg: error processing package pve-ha-manager (--configure):
subprocess installed post-installation script returned error exit status 1
Processing triggers for man-db (2.7.6.1-2) ...
Errors were encountered while processing:
pve-ha-manager
E: Sub-process /usr/bin/dpkg returned an error code (1)
W: Operation was interrupted before it could finish"
I'm guessing the reason why it did that was because I pressed ctrl+d trying to abort at a stage where he'd already uninstalled essential packages.
Anyway, is there any way I can reinstall proxmox from the cli without having to do a clean reinstallation?
apt-get install pve-manager says:
Code:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 pve-manager : Depends: qemu-server (>= 1.1-1) but it is not going to be installed
               Depends: pve-ha-manager but it is not going to be installed
               Depends: pve-container but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
I'm guessing I'd also have to uninstall other proxmox packages first. Where should I begin?
Thanks!
 
Try to install the proxmox-ve package first, as it is the meta package. If that doesn't work, resolve the error you got from the uninstall first and then try to install the packages again.
 
I eventually added the proxmox repo for debian:
deb http://download.proxmox.com/debian/pve
I did get a warning about not being able to authenticate because there was no public key, but when I installed 'pve-manager' (I did it before I read your post), it worked giving another confirmation.
There were some lxc containers that didn't work, I got a weird permission denied error when I tried to start them and I read on the internet that it might have something to do with apparmor. So I tried to uninstall it completely and I confirmed before I read about the dependencies (i.e. the proxmox packages), that's how I had got in that situation. Anyway, the weird thing is that now, after reinstalling the proxmox packages, the containers worked instantly. So I'm guessing it might have something to do with apparmor, but I'm not sure what.
Some of the logs:
Code:
 lxc-start 205 20180328113201.192 INFO     lxc_start_ui - tools/lxc_start.c:main:280 - using rcfile /var/lib/lxc/205/config
      lxc-start 205 20180328113201.205 ERROR    lxc_container - lxccontainer.c:do_lxcapi_start:984 - Permission denied - Failed to make / rslave at startup
      lxc-start 205 20180328113201.206 ERROR    lxc_start_ui - tools/lxc_start.c:main:371 - The container failed to start.
      lxc-start 205 20180328113201.206 ERROR    lxc_start_ui - tools/lxc_start.c:main:375 - Additional information can be obtained by setting the --logfile and --logpriority options.