I just got myself an RPI3 upgrading fro the 1 and when doing “sudo apt-get upgrade” It first takes a while and then it does this:
“E: Sub-process /usr/bin/dpkg exited unexpectedly”
And after that the entire linux system is basically ruined:
Sudo is no longer a thing (-bash: /usr/bin/sudo: No such file or directory)
nano is no longer a thing (-bash: nano: command not found)
VI is no longer a thing (-bash: vi: command not found)
cat is no longer a thing (-bash: cat: command not found)
power off is no longer a thing (-bash: poweroff: command not found)
I can reflash the OS but upgrade does the same over and over again.
First sudo apt-get upgrade is not the right command you should do sudo apt-get dist-upgrade
Secondly if your sytem fails during an upgrade the likely cause is a faulty SD card or a bad power supply.
Suggest you do a clean install and then do grab-logs -A before you do the upgrade and then also while you do the upgrade open a second ssh window and do grab-logs -A from time to time.
Afterwards put all the URL’s you received into a post.
Had something similar a few weeks ago having Raspbian installed on a RPi2 using a 64GB msdcard: all of a sudden after running apt-get upgate && …upgrade most of the systems functions were gone.
Didn’t investigate much then as I recalled that the RPi1/2/3 are only meant to be used with 32GB cards, and there is no guarantee that a 64GB card may sooner or later not start to literally overwrite itself (or so I heard - there was a case a few years ago about USB sticks that were sold with faked sizes, and those overwrote themselves after exceeding their real space, rendering most of the data stored unusable).
Since the above happend to my RPi2 and its 64GB card after running for 3 weeks and I now have it running for 4 weeks on a smaller card, I could imagine that this was the culprit (in my case).
diversion by base-files-osmc from: /usr/bin/apt-get
diversion by base-files-osmc to: /usr/bin/apt-get-real
diversion by base-files-osmc from: /usr/bin/apt-get
diversion by base-files-osmc to: /usr/bin/apt-get-real
base-files-osmc, apt: /usr/bin/apt-get
and the refusal to run `apt-get upgrade’:
Running apt-get upgrade on your system can cause adverse effects on your system
Use apt-get dist-upgrade, which is the proper way to administer a Debian / Ubuntu system
apt-get' is a debian tool. Is upstream debian aware of these "adverse effects" using the "upgrade" command may have? Are any bugs reported against package apt’ documenting the mentioned “adverse effects”?
And why are you suggesting `apt-get dist-upgrade’ would be “the proper way”? AFAIK, things lay the other way around.
Our advice comes from Debian themselves. This has been covered in detail on the forum. apt-get upgrade does not handle new dependencies correctly when introduced to existing packages on the target. This can lead to breakage, but as Debian upstream moves slowly, you usually get away with it. OSMC moves faster, and dependencies can be introduced via our virtual packages (i.e for hardware enablement when Pi 3 was introduced)
You can still upgrade with apt-get nowarnupgrade. We will be able to provide no support for this and you will potentially ruin your system. Do so at your own risk.
Huh? I can’t see anything there mentioning “adverse effects” about using “upgrade” nor proclaiming “dist-upgrade” to be “the proper way to administer a Debian / Ubuntu system”. In my experience (15+ years) of using the debian distribution, showed use of "dist-upgrade" to be trickier than “upgrade”.
Filing bugs on package apt at submit@bugs.debian.org about problems with using “apt-get upgrade” would be a better approach to get misbehaviour fixed.
apt-get, the APT-based command-line tool for handling packages, provides a simple, safe way to install and upgrade packages.
To use apt-get, edit the /etc/apt/sources.list file to set it up, just as for aptitude, Section 9.1.1.
Then run
apt-get update
followed by
apt-get dist-upgrade
Seems pretty straight forward to me… I would take that to mean that straying from the use of these explicit commands could possibly be something other than “safe”.
I’d suggest you read around this more. It has been covered in the forum.
apt-get upgrade will only update packages that do not interfere with the installed state of another package. That means that if a package introduces a new package (new dependency) it will not be upgraded. OSMC sometimes introduces new dependencies.
Debian does this too however, as does Ubuntu. For example, linux-image-generic is a metapackage and its dependency changes when the kernel is updated.
To reiterate, this is not a bug in APT, it is by design. Upgrade was for seasoned sysadmins rolling their own kernel and not wanting to introduce new packages. There is a reason that apt-get dist-upgrade is the same as apt-get full-upgrade.
It has been recommended since 2009 to use dist-upgrade, by running apt-get upgrade you are in contravention of Debian administration policy.
If you are sure you know what you’re doing, override it with the above suggestion.
OSMC is a recognised Debian derivative and fully complies with upstream policy. I’ll mention at the next DebConf that this needs to be clarified.