lirc postinst lists modules from incorrect directory

Bug #1004239 reported by Ari on 2012-05-24
56
This bug affects 11 people
Affects Status Importance Assigned to Milestone
lirc (Ubuntu)
Undecided
Unassigned

Bug Description

lirc installation with apt-get ends with an error message.
lirc removal and then re-installation ends with the same error message.

sudo apt-get install lirc

Suggested packages:
  lirc-x
The following NEW packages will be installed:
  lirc
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/625 kB of archives.
After this operation, 2,920 kB of additional disk space will be used.
Preconfiguring packages ...
Selecting previously unselected package lirc.
(Reading database ... 302295 files and directories currently installed.)
Unpacking lirc (from .../lirc_0.9.0-0ubuntu1_amd64.deb) ...
Processing triggers for ureadahead ...
Processing triggers for man-db ...
Setting up lirc (0.9.0-0ubuntu1) ...
ls: cannot access /lib/modules/3.2.0-24-generic/kernel/drivers/staging/lirc: No such file or directory
dpkg: error processing lirc (--configure):
 subprocess installed post-installation script returned error exit status 128
Errors were encountered while processing:
 lirc
E: Sub-process /usr/bin/dpkg returned an error code (1)

Related branches

Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in lirc (Ubuntu):
status: New → Confirmed
ianc (ian-criddle) wrote :

Mythbuntu 12.04 64-bit, fresh install updated to 3.2.0-25 kernel . I don't have:

/lib/modules/3.2.0-25-generic/kernel/drivers/staging/lirc

but I do have:

/lib/modules/3.2.0-25-generic/kernel/drivers/staging/media/lirc

So workaround is to:

sudo ln -s /lib/modules/3.2.0-25-generic/kernel/drivers/staging/media/lirc /lib/modules/3.2.0-25-generic/kernel/drivers/staging/lirc

Now works OK

Ari (ari-reads) wrote :

Thanks Ian for this. I will create the symlink and re-install lirc. Curiously though, LIRC was actually working for me, for reasons unkown (I've been ignoring the error message, my remote control works all the same)

ianc (ian-criddle) wrote :

Interesting: it wasn't working for me.

The link will need to be kernel-specific of course.

ullix (ullix) wrote :

got the same problem:

~$ sudo dpkg-reconfigure lirc
ls: cannot access /lib/modules/3.2.0-26-generic/kernel/drivers/staging/lirc: No such file or directory
 * Loading LIRC modules [ OK ]
 * Starting remote control daemon(s) : LIRC [fail]

and after the workaround from above:

sudo ln -s /lib/modules/3.2.0-26-generic/kernel/drivers/staging/media/lirc /lib/modules/3.2.0-26-generic/kernel/drivers/staging/lirc

got this problem:

~$ sudo dpkg-reconfigure lirc * Stopping remote control daemon(s): LIRC [fail]
 * Loading LIRC modules [ OK ]
 * Starting remote control daemon(s) : LIRC [fail]

Don't know why it failed again.

ullix (ullix) wrote :

weel, the last fail was due to the new device /dev/lircd, while lircd still assume it to be /dev/lirc (?)

After adding 'REMOTE_DEVICE="/dev/lircd"' to hardware.conf, at least I got the restart right:

~$ sudo /etc/init.d/lirc restart
 * Stopping remote control daemon(s): LIRC [ OK ]
 * Loading LIRC modules [ OK ]
 * Starting remote control daemon(s) : LIRC [ OK ]

Zac (zac280) wrote :

My LIRC was working with iguanaIR on a brand new install of 12.04. I stupidly let ubuntu update, and it broke LIRC. After remove of LIRC, I get

htpc@htpc:~$ sudo apt-get install lirc
Reading package lists... Done
Building dependency tree
Reading state information... Done
Suggested packages:
  lirc-x
The following NEW packages will be installed:
  lirc
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/615 kB of archives.
After this operation, 2,908 kB of additional disk space will be used.
Preconfiguring packages ...
Selecting previously unselected package lirc.
(Reading database ... 178471 files and directories currently installed.)
Unpacking lirc (from .../lirc_0.9.0-0ubuntu1_i386.deb) ...
Processing triggers for doc-base ...
Processing 1 added doc-base file...
Processing triggers for man-db ...
Processing triggers for ureadahead ...
Setting up lirc (0.9.0-0ubuntu1) ...
dpkg: error processing lirc (--configure):
 subprocess installed post-installation script returned error exit status 20
Errors were encountered while processing:
 lirc
E: Sub-process /usr/bin/dpkg returned an error code (1)

The workaround wouldn't work for me. I tried

sudo ln -s /lib/modules/3.2.0-26-generic-pae/kernel/drivers/staging/media/lirc /lib/modules/3.2.0-26-generic-pae/kernel/drivers/staging/lirc

I need build dependencies to compile iguanaIR into LIRC, but says LIRC is not fully installed.

Zac (zac280) wrote :

I now have LIRC compiled with the iguanaIR driver, but the LIRC install is still broken. Without the symlink fix, I get the ls error. With it, I still get

Errors were encountered while processing:
 lirc

I've tried apt-get clean, dpkg --configure -a and apt-get install -f, none fix the broken lirc install. It's a real pain since it won't let me install anything else. For example:

htpc@htpc:~$ sudo apt-get install samba-common
Reading package lists... Done
Building dependency tree
Reading state information... Done
samba-common is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue [Y/n]? y
Setting up lirc (0.9.0-0ubuntu1) ...
dpkg: error processing lirc (--configure):
 subprocess installed post-installation script returned error exit status 20
No apport report written because MaxReports is reached already
                                                              Errors were encountered while processing:
 lirc
E: Sub-process /usr/bin/dpkg returned an error code (1)

I'm pretty much a linux noob, and have no idea why a broken install of one package affects everything else. The only bright side is my IR blaster works again.

bobwdn (rewdn) wrote :

I am having the same experience. After creating the symbolic link as suggested above. I restart lirc and I get:

strator@mythbox:~$ sudo /etc/init.d/lirc restart
 * Stopping remote control daemon(s): LIRC [fail]
 * Loading LIRC modules [ OK ]
 * Unable to load LIRC kernel modules. Verify your
 * selected kernel modules in /etc/lirc/hardware.conf

Joel Ebel (jbebel) wrote :

There are a lot of unrelated problems reported in this bug. The original problem was this:
ls: cannot access /lib/modules/3.2.0-24-generic/kernel/drivers/staging/lirc:
  No such file or directory

The solution to this would be to patch lirc.postinst to look in /lib/modules/$KERNEL/kernel/drivers/staging/media/lirc

A debdiff for lirc is attached which should fix the original issue of this bug.

For the other problems described, you should consider support forums, mailing lists, or opening a new bug.

summary: - lirc installation error in Ubuntu 12.04
+ lirc postinst lists modules from incorrect directory

The attachment "debdiff patch to fix path to modules in lirc.postinst" of this bug report has been identified as being a patch in the form of a debdiff. The ubuntu-sponsors team has been subscribed to the bug report so that they can review and hopefully sponsor the debdiff. In the event that this is in fact not a patch you can resolve this situation by removing the tag 'patch' from the bug report and editing the attachment so that it is not flagged as a patch. Additionally, if you are member of the ubuntu-sponsors team please also unsubscribe the team from this bug report.

[This is an automated message performed by a Launchpad user owned by Brian Murray. Please contact him regarding any issues with the action taken in this bug report.]

tags: added: patch
Ari (ari-reads) wrote :

@Joel: I tried modifying the lirc.postinst I found in:

/var/lib/dpkg/info

with the changes suggested - to no avail.

Is there a way I can get my installation fixed manually? or... will this patch be back-ported?

Joel Ebel (jbebel) wrote :

What are you experiencing as the problem now? If you have the package installed, you manually edit lirc.postinst, and then run dpkg-reconfigure lirc that should succeed without the error.

I couldn't say whether this will make it into Precise. I'm not an Ubuntu maintainer.

Ari (ari-reads) wrote :

The error I keep seeing happens every time I "apt-get install" anything:

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

If I try dpkg-reconfigure, here's what I get:

$ sudo dpkg-reconfigure lirc
/usr/sbin/dpkg-reconfigure: lirc is broken or not fully installed

this is after manually editing /var/lib/dpkg/info/lirc.postinst

bobwdn (rewdn) wrote :

per post #10 by jbebel

I found this instruction page: https://wiki.ubuntu.com/UbuntuPackagingGuide/BuildFromDebdiff

Following those instructions, the debdiff patch appeared (I am a novice with little experience at this level) to build properly with no errors and created (appeared to be new) lirc-x_0.9.0-0ubuntu2_amd64.deb file.

The final instruction of "BuildFromDebdiff" page is to install with: sudo dpkg -i ../lirc-x_0.9.0-0ubuntu2_amd64.deb

This is the resulting output: [myuser]@mythtv01:~/lirc$ sudo dpkg -i ../lirc-x_0.9.0-0ubuntu2_amd64.deb
dpkg: error processing ../lirc-x_0.9.0-0ubuntu2_amd64.deb (--install):
 cannot access archive: No such file or directory
Errors were encountered while processing:
 ../lirc-x_0.9.0-0ubuntu2_amd64.deb

So, the patch did not work for me.

Joel Ebel (jbebel) wrote :

Ari, you have something worse broken about your installation. You should try to purge lirc and reinstall it. I'm not seeing the errors you are getting.

bobwdn, it looks like you didn't actually successfully build the package. If it built lirc-x_0.9.0-0ubuntu1_amd64.deb then you didn't install the patch. If there's no deb built, then the package failed to build. There's probably an error that showed up in one of the steps that you missed.

Jamie Strandboge (jdstrand) wrote :

Joel, thanks for your patch. There were a couple of problems with it however:
 * it targeted 'precise', but precise is release now. This should target 'quantal' instead
 * it does not reference the bug in the changelog

In the interest of time, I have made these adjustments and sponsored this to 12.10. If you would like this to be fixed in 12.04 LTS as well, please follow https://wiki.ubuntu.com/StableReleaseUpdates. Thanks again!

Launchpad Janitor (janitor) wrote :

This bug was fixed in the package lirc - 0.9.0-0ubuntu2

---------------
lirc (0.9.0-0ubuntu2) quantal; urgency=low

  * Fix path to modules in lirc.postinst (LP: #1004239)
 -- Joel Ebel <email address hidden> Wed, 08 Aug 2012 01:28:48 -0400

Changed in lirc (Ubuntu):
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers