MichaIng / DietPi-Docs

Source repository for the DietPi OS documentation
https://dietpi.com/docs/
Creative Commons Attribution Share Alike 4.0 International
154 stars 52 forks source link

Beta installer failed to complete installation and Sudo user lost the sudo ability #994

Closed rohitnaikn closed 2 months ago

rohitnaikn commented 2 months ago

Details:

Actual behaviour:

Stuck and the user with Sudo lost sudo Powers

Extra details:

Additional logs:

Reading package lists...
Building dependency tree...
Reading state information...
The following additional packages will be installed:
  libc-bin libc-dev-bin libc-l10n libc6 libc6-dev locales usr-is-merged
Suggested packages:
  libnss-nis libnss-nisplus manpages-dev
Recommended packages:
  manpages manpages-dev libc-devtools
The following packages will be REMOVED:
  libnih1* ureadahead* usrmerge*
The following NEW packages will be installed:
  libc-l10n usr-is-merged
The following packages will be upgraded:
  libc-bin libc-dev-bin libc6 libc6-dev locales
5 upgraded, 2 newly installed, 3 to remove and 32 not upgraded.
Need to get 8541 kB of archives.
After this operation, 950 kB of additional disk space will be used.
Get:1 https://deb.debian.org/debian-security bookworm-security/main armhf libc-l10n all 2.36-9+deb12u6 [675 kB]
Get:2 https://deb.debian.org/debian-security bookworm-security/main armhf libc-dev-bin armhf 2.36-9+deb12u6 [44.3 kB]
Get:3 https://deb.debian.org/debian-security bookworm-security/main armhf libc6-dev armhf 2.36-9+deb12u6 [1267 kB]
Get:4 https://deb.debian.org/debian-security bookworm-security/main armhf locales all 2.36-9+deb12u6 [3902 kB]
Get:5 https://deb.debian.org/debian-security bookworm-security/main armhf libc6 armhf 2.36-9+deb12u6 [2143 kB]
Get:6 https://deb.debian.org/debian-security bookworm-security/main armhf libc-bin armhf 2.36-9+deb12u6 [504 kB]
Get:7 https://deb.debian.org/debian bookworm/main armhf usr-is-merged all 37~deb12u1 [5616 B]
Preconfiguring packages ...
Fetched 8541 kB in 2s (4921 kB/s)
Selecting previously unselected package libc-l10n.
(Reading database ... 61714 files and directories currently installed.)
Preparing to unpack .../libc-l10n_2.36-9+deb12u6_all.deb ...
Unpacking libc-l10n (2.36-9+deb12u6) ...
Preparing to unpack .../libc-dev-bin_2.36-9+deb12u6_armhf.deb ...
Unpacking libc-dev-bin (2.36-9+deb12u6) over (2.35-0ubuntu3.7) ...
Preparing to unpack .../libc6-dev_2.36-9+deb12u6_armhf.deb ...
Unpacking libc6-dev:armhf (2.36-9+deb12u6) over (2.35-0ubuntu3.7) ...
dpkg: error processing archive /tmp/apt/archives/libc6-dev_2.36-9+deb12u6_armhf.deb (--unpack):
 trying to overwrite '/usr/lib/arm-linux-gnueabihf/audit/sotruss-lib.so', which is also in package libc6:armhf 2.35-0ubuntu3.7
Errors were encountered while processing:
 /tmp/apt/archives/libc6-dev_2.36-9+deb12u6_armhf.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

[FAILED] DietPi-Installer | Unable to continue, DietPi-Installer will now terminate.

Joulinar commented 2 months ago

convert ubuntu 22

DietPi is based on Debian and you can't convert an Unbuntu.

rohitnaikn commented 2 months ago

then why can't there be a compatibility check and stop it before initiating the installation?

MichaIng commented 2 months ago

Of course we could bloat the code with dozens of checks, and still there would be cases where users run into errors. Isn't

Requirement 1: Ensure a Debian/Raspbian OS is running on the system:

from the docs clear enough?

Also on the download page:

Convert any Debian image, into a DietPi system.

This is naturally a script which is not assured to run through in every case, and requires some knowledge and manual tinkering in cases. Reading and understanding the docs is hence the minimal required efforts anyway. It is impossible to test for any possible base OS composition.

rohitnaikn commented 2 months ago

ok i thought it could covert any Debian based OS as it says 'ANY' Debian image

MichaIng commented 2 months ago

Debian is "Debian", Ubuntu is "Ubuntu". But yeah, Ubuntu uses 99% Debian sources and the same packaging system, so I see that one could see Ubuntu, Kali and other APT distros as "Debian-based".

I'm anyway about to restructure the script, and will probably add some minimal checks: Debian and systemd as init system.

Nasty that Ubuntu uses Debian versions or codenames in /etc/debian_version, else it would error out at that point already.

rohitnaikn commented 2 months ago

thanks