conman és a dpkg

Fórumok

Sziasztok.

Conman telepítése debianra... Az alábbi hiba keletkezik, és nem tudom mitől.

Errors were encountered while processing:
 conman
E: Sub-process /usr/bin/dpkg returned an error code (1)

Próbáltam egy reconfigure-t, majd egy purge után egy újratelepítést, de ugyanez áll fenn. És minden egyes apt után ez boldogít.

Szerintetek ezmiez?

Hozzászólások

Én ilyenkor először a sudo dpkg --configure -a és sudo apt install -f parancsokkal szoktam próbálkozni.

“The basic tool for the manipulation of reality is the manipulation of words. If you can control the meaning of words, you can control the people who must use them.”

― Philip K. Dick

Ezért a kommentemért nem fognak szeretni itt a hupon.

sudo apt install aptitude

sudo aptitude update

sudo aptitude upgrade

Megoldja az esetek 99% százalékában.

“The basic tool for the manipulation of reality is the manipulation of words. If you can control the meaning of words, you can control the people who must use them.”

― Philip K. Dick

aptitude
Performing actions...
Setting up conman (0.2.7-1.1) ...
invoke-rc.d: initscript conman, action "start" failed.
dpkg: error processing package conman (--configure):
 installed conman package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
 conman
E: Sub-process /usr/bin/dpkg returned an error code (1)
Setting up conman (0.2.7-1.1) ...
invoke-rc.d: initscript conman, action "start" failed.
dpkg: error processing package conman (--configure):
 installed conman package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
 conman
Press Return to continue, 'q' followed by Return to quit.

--------
synaptic hasonló.

10-féle lény van:
-- aki ismeri a bináris számrendszert,
-- és amelyik nem.

Hát nálam:

+ case $saction in
+ '[' LoadState=loaded '!=' LoadState=masked ']'
+ systemctl start conman.service
Warning: The unit file, source configuration file or drop-ins of conman.service changed on disk. Run 'systemctl daemon-reload' to reload units.
+ exit 0

Mondjuk fura, itt van egy diszkrét exit 0 a végén, hogy nehogy valami baj legyen...

Aztán:

root@app0:~# systemctl cat conman
# /lib/systemd/system/conman.service
[Unit]
Description=serial console management program
Documentation=man:conman(8)

[Service]
ExecStart=/usr/sbin/conmand -F
KillMode=process

[Install]
WantedBy=multi-user.target
root@app0:~# /usr/sbin/conmand -F
ERROR:     Configuration "/etc/conman.conf" has no consoles defined
root@app0:~#

Szóval mint írták is, errefelé keresgélnék.

Szerkesztve: 2024. 06. 07., p – 16:20

Vaktában találgatva azt mondanám, hogy a postinst-script-ben Python van. (Vagy valami még egzotikusabb okosság.)

Szerk: vagy a `mc`-vel lehet beletapcsikolni a `conman*.deb` fájlba, vagy az `ar x`-szel kibontani, és úgy beletapicskolni a `mc`-vel.

Abban semmi extra nincs:
 

#!/bin/sh
set -e
# Automatically added by dh_installinit
if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ]; then
        if [ -x "/etc/init.d/conman" ]; then
                update-rc.d conman defaults >/dev/null
                invoke-rc.d conman start || exit $?
        fi
fi
# End automatically added section

ezért bátorkodtam javasolni az invoke-rc.d conman start parancs kiadását, illetve megnézni, hogy az mit csinál, mit próbál csinálni. (az indítóscript /etc/init.d/conman sima shell script, én abba beleraknék a #!/bin/sh mögé minimum egy -x kapcsolót.

Ha megnézed a /etc/init.d/conman scriptet, ami "mindennel is" működni akar, látszik, hogy például RHEL esetén a daaemon(3) használatával indítja a motyót, a scriptben 2009-es SVN-es $Id$ van behelyettesítve (már a dátuma 2015, de gondolom 2009 után svn-ből git-be migrálták - de akkor is 9 éve nem lett hozzápiszkálva...

Gondolom a karbantartójának "jóvanazúúúgy", az eredeti forrást már bottal sem piszkálja senki... Legfeljebb ha valahol nagyon eltörik, akkor...

Ez hányas Debian, és milyen tárolókból telepítesz? Nincs hozzáadva még esetleg külső tároló, ami bezavar?

Windows 95/98: 32 bit extension and a graphical shell for a 16 bit patch to an 8 bit operating system originally coded for a 4 bit microprocessor, written by a 2 bit company that can't stand 1 bit of competition.”

12-es debian, ha jól emlékszem.

6.6.12-1-liquorix-amd64 #1 ZEN SMP PREEMPT liquorix 6.6-16~mx23ahs (2024-01-18) x86_64 GNU/Linux

nem adtam hozzá a tárolójához semmi extrát csak az opencpn-t és az operát.

deb http://deb.debian.org/debian/ bookworm main contrib non-free non-free-firmware
deb http://security.debian.org/debian-security/ bookworm-security non-free-firmware non-free contrib main
deb http://deb.debian.org/debian/ bookworm-updates main contrib non-free non-free-firmware
deb http://mxrepo.com/mx/repo/ bookworm non-free main
deb http://mxrepo.com/mx/repo/ bookworm ahs

deb https://ppa.launchpadcontent.net/opencpn/opencpn/ubuntu/ bookworm main

deb https://deb.opera.com/opera-stable/ stable non-free

 

 

(Nemsokára jön a letolás, hogy miért használok elfajzott disztrót.)

10-féle lény van:
-- aki ismeri a bináris számrendszert,
-- és amelyik nem.

Még egy hülye ötlet: apt policy conman:

root@app0:~# apt policy conman
conman:
  Installed: (none)
  Candidate: 0.2.7-1.1
  Version table:
     0.2.7-1.1 900
        900 http://deb.debian.org/debian stable/main amd64 Packages
        100 /var/lib/dpkg/status

Szóval hogy tényleg gyári repóból. Nem mintha azt hinném hogy nem, de ki tudja.
 

# apt policy conman
conman:
  Installed: 0.2.7-1.1
  Candidate: 0.2.7-1.1
  Version table:
 *** 0.2.7-1.1 500
        500 http://deb.debian.org/debian bookworm/main amd64 Packages
        100 /var/lib/dpkg/status

 

Akkor az lehet a baj,hogy bookworm van?

10-féle lény van:
-- aki ismeri a bináris számrendszert,
-- és amelyik nem.

Nem. Bookworm = 12 = stable, legalábbis mostanában.

Közelebb vihet a megoldáshoz, ha a

bash -x invoke-rc.d conman start

parancs releváns részét megnézed (ahogy azt már javasolták), elvileg systemd-re fut ki az is. Aztán kiadni azt a parancsot, amit a systemd is kiad:

/usr/sbin/conmand -F

És abból hátha kiderül valami.

Ezt, amit írsz,még sosem használtam. Lám, 52 évesen is tanul az ember.

Ez a kimenete:

# bash -x invoke-rc.d conman start
+ RUNLEVELHELPER=/sbin/runlevel
+ POLICYHELPER=/usr/sbin/policy-rc.d
+ INITDPREFIX=/etc/init.d/
+ RCDPREFIX=/etc/rc
+ BEQUIET=
+ MODE=
+ ACTION=
+ FALLBACK=
+ NOFALLBACK=
+ FORCE=
+ RETRY=
+ RETURNFAILURE=
+ RC=
+ is_systemd=
+ is_openrc=
+ SKIP_SYSTEMD_NATIVE=
+ set +e
+ test 2 -eq 0
+ state=I
+ test 2 -gt 0
+ test I '!=' III
+ case "$1" in
+ case ${state} in
+ verifyparameter conman
+ test 1 -eq 0
+ test 1 -ne 1
+ return
+ INITSCRIPTID=conman
+ state=II
+ shift
+ test 1 -gt 0
+ test II '!=' III
+ case "$1" in
+ case ${state} in
+ verifyparameter start
+ test 1 -eq 0
+ test 1 -ne 1
+ return
+ ACTION=start
+ state=III
+ shift
+ test 0 -gt 0
+ test III '!=' III
+ test -d /run/systemd/system
+ test -f /run/openrc/softlevel
+ test '!' -f /etc/init.d/conman
+ '[' '!' -x /sbin/runlevel ']'
++ /sbin/runlevel
+ RL='N 5'
+ RL=5
+ test x5 = x0
+ test x5 = x6
+ test x5 = x0
+ test x5 = x6
+ RC=
+ '[' -n '' ']'
+ test x5 '!=' x
++ ls -d -Q /etc/rc5.d/S04conman
++ xargs
+ SLINK=/etc/rc5.d/S04conman
++ ls -d -Q '/etc/rc5.d/K[0-9][0-9]conman'
++ xargs
+ KLINK=
++ ls -d -Q '/etc/rcS.d/S[0-9][0-9]conman'
++ xargs
+ SSLINK=
+ verifyrclink /etc/rc5.d/S04conman
+ doexit=
+ test 1 -gt 0
+ test '!' -L /etc/rc5.d/S04conman
+ test '!' -f /etc/rc5.d/S04conman
+ shift
+ test 0 -gt 0
+ test x '!=' x
+ return 0
+ case ${ACTION} in
+ testexec /etc/rc5.d/S04conman
+ test 1 -gt 0
+ test -x /etc/rc5.d/S04conman
+ return 0
+ RC=104
+ _executable=
+ '[' -n '' ']'
+ testexec /etc/init.d/conman
+ test 1 -gt 0
+ test -x /etc/init.d/conman
+ return 0
+ _executable=1
+ '[' 1 = 1 ']'
+ test x104 = x
+ querypolicy
+ policyaction=start
+ test x104 = x101
+ test x/usr/sbin/policy-rc.d '!=' x
+ test -x /usr/sbin/policy-rc.d
+ test '!' -e /sbin/init
+ test x104 = x
+ return
+ case ${RC} in
+ test x = xquery
+ test x '!=' x
+ test 104 -eq 104
+ '[' -n '' ']'
+ testexec /etc/init.d/conman
+ test 1 -gt 0
+ test -x /etc/init.d/conman
+ return 0
+ RC=102
+ setechoactions start
+ test 1 -gt 1
+ echoaction=
+ test '!' -z start
+ getnextaction start
+ saction=start
+ shift
+ ACTION=
+ test '!' -z
+ '[' -n '' ']'
+ '[' -n '' ']'
+ /etc/init.d/conman start
+ RC=1
+ test '!' -z ''
+ test '!' -z ''
+ printerror initscript conman, action '"start"' failed.
+ test x = x
++ basename invoke-rc.d
+ echo invoke-rc.d: 'initscript conman, action "start" failed.'
invoke-rc.d: initscript conman, action "start" failed.
+ '[' -n '' ']'
+ exit 1

Az initscriptjével lehet valami, de hogy mi...
 

10-féle lény van:
-- aki ismeri a bináris számrendszert,
-- és amelyik nem.

"Az initscriptjével lehet valami, de hogy mi..."

bash -x /etc/init.d/conman start

Eleve nem világos hogy nálad miért nem systemd-re futott rá, őszintén szóval lusta vagyok végigbogarászni.

De az initscript is egy egyszerű holmi szokott lenni, az se fog mást indítani, mint a systemd. Gondolom, megintcsak lusta vagyok ezért feltenni megint a csomagot.

(Nemsokára jön a letolás, hogy miért használok elfajzott disztrót.)

Nincs a Debiannal semmi baj. Nagyon jó kis disztró. Magam is használtam éveken át elsődleges asztali rendszerként is. Igaz mostanság én is elkurvultam, de kényelmes LinuxMint nagyon. Rosszul karbantartott csomag, vagy systemd nyűg pedig mint tapasztaljuk minden disztrón lehet.

“The basic tool for the manipulation of reality is the manipulation of words. If you can control the meaning of words, you can control the people who must use them.”

― Philip K. Dick

Ez debian alapú disztró.
Abból alakították ki az MX és antiX disztrót, és az AV ezekre épül. Vagyis egy harmadrendű disztribúció, ami számomra azért fontos, mert ezen minden midi és audio fullos. És pipewire is van.

10-féle lény van:
-- aki ismeri a bináris számrendszert,
-- és amelyik nem.

"Rosszul karbantartott csomag"

Ez van most - sajnos a szolgáltatás  indítása egy 2015-ös dátumú, "disztribúciófüggetlen" scriptre van bízva, ami... Mondjuk úgy, erősen kiabál egy újragondolásért/ráncfelvarrásért... Hogy ezt az upstream-nek vagy az adott terjesztésnek, az ottani csomagkarbantartónak kellene-e megoldani, nos, az jó kérdés...

Ez az Ubuntu PPA meg MX tároló gyanús, hogy azok valamelyike zavar be.

A /var/log/dpkg* tartalmát betehetnéd ide még, vagy valahova pastebin vagy hasonló helyre. Hátha az mutat még valamit. A conmanhoz nem értek, így azt nem vágom, hogy mi miatt hasalna el az init scriptje.

Windows 95/98: 32 bit extension and a graphical shell for a 16 bit patch to an 8 bit operating system originally coded for a 4 bit microprocessor, written by a 2 bit company that can't stand 1 bit of competition.”

Újabb fejlemény, egy upgrade után a conman-ról észrevettem egy érdekességet:
 

Setting up conman (0.2.7-1.1) ...
invoke-rc.d: initscript conman, action "start" failed.
dpkg: error processing package conman (--configure):
 installed conman package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
 conman
E: Sub-process /usr/bin/dpkg returned an error code (1)

ez is azt írja, hogy a conman initscriptjével van a baj.

10-féle lény van:
-- aki ismeri a bináris számrendszert,
-- és amelyik nem.

ar x package.deb

tar xf control.tar.gz

nézd meg az init scriptet.

Szerkesztve: 2024. 06. 08., szo – 19:41

Kipróbáltam az apt-get install conman-t egy WSL/Ubuntu kombinációban (furcsábbnál furcsább függőségei vannak), egy hibaüzenet jött csak a telepítés során:

Setting up conman (0.2.7-1build2) ...
invoke-rc.d: could not determine current runlevel

Mindenesetre lett egy ilyen file:
/var/cache/apt/archives/conman_0.2.7-1build2_amd64.deb

Hát van egy /etc/init.d/conman, de az már nagyon meg van könnyítve, szóval egy kis fejlesztést végeztem rajta:

log_fini ()
{
# Output informational/error message at end of action.
##
  STATUS="$1"
  ERRMSG="$2"

  printf 'STATUS=%s ERRMSG=%s\n' "$STATUS" "$ERRMSG"
}

Tesztelése:

# /etc/init.d/conman start
STATUS=1 ERRMSG=ERROR:     Configuration "/etc/conman.conf" has no consoles defined

megszerkeszted az alabbi fajlt:

/var/lib/dpkg/info/conman.postinst

pl a set -e sor utan beraksz egy "exit 0"-at.

majd "sudo apt install -f " vagy "dpkg --configure -a"

ekkor a postinst lefut, de az exit 0 miatt egybol befejezi a futast, az install sikeres lesz. azutan neked kell kezzel beallitani a systemd servicet:

systemctl status conman.service

ha disabled, akkor systemctl enable conman.service, es akar el is indithatod.

A vegtelen ciklus is vegeter egyszer, csak kelloen eros hardver kell hozza!

Megcsináltam az exit 0-t...

Megnéztem: az init van nálam.

 

# ps -p 1 -o comm=
init

 

Tehát:

# service conman status
Checking status of ConMan: stopped.

# service conman start

# service conman status
Checking status of ConMan: stopped.
 

...amúgy közben netre vagyok csatlakozva.
A wicd és az ifconfig-dhcpcd korszak után a conman nekem több, mint érdekes.

10-féle lény van:
-- aki ismeri a bináris számrendszert,
-- és amelyik nem.