OpenWrt Forum Archive

Topic: Status 127 when opkg configures packages (TP-Link WDR4300)

The content of this topic has been archived on 5 May 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Hi!

Lately I'm getting a lot of errors from opkg:

[spoiler]

Configuring libpthread.
//usr/lib/opkg/info/libpthread.postinst: line 3: default_postinst: not found
Configuring luci-theme-freifunk-bno.
//usr/lib/opkg/info/luci-theme-freifunk-bno.postinst: line 4: default_postinst: not found
Configuring luci-theme-openwrt.
//usr/lib/opkg/info/luci-theme-openwrt.postinst: line 4: default_postinst: not found
Configuring shadow-su.
//usr/lib/opkg/info/shadow-su.postinst: line 4: default_postinst: not found
Configuring unzip.
//usr/lib/opkg/info/unzip.postinst: line 4: default_postinst: not found
Configuring luci-theme-freifunk-generic.
//usr/lib/opkg/info/luci-theme-freifunk-generic.postinst: line 4: default_postinst: not found
Configuring bind-libs.
//usr/lib/opkg/info/bind-libs.postinst: line 4: default_postinst: not found
Configuring uclibcxx.
//usr/lib/opkg/info/uclibcxx.postinst: line 4: default_postinst: not found
Configuring unrar.
//usr/lib/opkg/info/unrar.postinst: line 4: default_postinst: not found
Configuring ca-certificates.
Configuring bind-dig.
//usr/lib/opkg/info/bind-dig.postinst: line 4: default_postinst: not found
Configuring zip.
//usr/lib/opkg/info/zip.postinst: line 4: default_postinst: not found
Collected errors:
 * pkg_run_script: package "libpthread" postinst script returned status 127.
 * opkg_configure: libpthread.postinst returned 127.
 * pkg_run_script: package "luci-theme-freifunk-bno" postinst script returned status 127.
 * opkg_configure: luci-theme-freifunk-bno.postinst returned 127.
 * pkg_run_script: package "luci-theme-openwrt" postinst script returned status 127.
 * opkg_configure: luci-theme-openwrt.postinst returned 127.
 * pkg_run_script: package "shadow-su" postinst script returned status 127.
 * opkg_configure: shadow-su.postinst returned 127.
 * pkg_run_script: package "unzip" postinst script returned status 127.
 * opkg_configure: unzip.postinst returned 127.
 * pkg_run_script: package "luci-theme-freifunk-generic" postinst script returned status 127.
 * opkg_configure: luci-theme-freifunk-generic.postinst returned 127.
 * pkg_run_script: package "bind-libs" postinst script returned status 127.
 * opkg_configure: bind-libs.postinst returned 127.
 * pkg_run_script: package "uclibcxx" postinst script returned status 127.
 * opkg_configure: uclibcxx.postinst returned 127.
 * pkg_run_script: package "unrar" postinst script returned status 127.
 * opkg_configure: unrar.postinst returned 127.
 * pkg_run_script: package "bind-dig" postinst script returned status 127.
 * opkg_configure: bind-dig.postinst returned 127.
 * pkg_run_script: package "zip" postinst script returned status 127.
 * opkg_configure: zip.postinst returned 127.

[/spoiler]

When I install a package I get all these errors, doesn't what I install. I don't know what is causing them.
Running opkg configure does not work, it presents me with this same list of errors.
Can it be because I installed packages from the trunk folder?

I have read this: https://forum.openwrt.org/viewtopic.php?id=44881 But the solution did not work.
I've also read this ticket: https://dev.openwrt.org/ticket/13735 But there's no solution there as far as I can see.

Does anybody know what is causing this and how to fix it?

Thanks in advance!

Edit: Even tho I see errors here, some packages, if not all, do function!

Edit2: I think I should mention what router I have ;p It's a TP-Link TL-WDR4300 (ar71xx)

(Last edited by keranoz on 22 Sep 2014, 11:03)

If you figure out a solution before someone replies, I'd like to know as well.

You didn't say what version and snapshot you are using but I'll assume you are using a trunk snapshot because that's where I also saw the problem. Somehow this got broken in one of the trunk revisions awhile back. It was just fixed in a revision a couple of weeks ago. Use the latest version of trunk and problem solved.

Cheers...

Same problem here with CC

root@openwrt:/tmp# opkg install libpopt_1.7-5_ramips_24kec.ipk
Installing libpopt (1.7-5) to root...
Configuring libpopt.
//usr/lib/opkg/info/libpopt.postinst: line 4: default_postinst: not found
Collected errors:
 * pkg_run_script: package "libpopt" postinst script returned status 127.
 * opkg_configure: libpopt.postinst returned 127.

I had this problem upgrading from a trunk 14.07. I fixed it like so:

  1. Login to your router and navigate to System -> Backup / Flash Firmware.

  2. Click Generate archive and open it up in 7-Zip.

  3. Navigate through the folders and files and DELETE everything that you DON'T need or haven't changed. For example, I deleted everything except the likes of /etc/config/firewall, wireless, etc.

  4. Flash the system upgrade and make sure you tell Luci to delete config files so you have a fresh install.

  5. After reboot, restore the backup you edited.

The discussion might have continued from here.