Code: Select all
/i-data/5fe660ed/.PKG/MidnightCommander/bin/mc: error while loading shared libraries: /i-data/5fe660ed/.PKG/MidnightCommander/lib/libiconv.so.2: file too short
Code: Select all
/i-data/5fe660ed/.PKG/MidnightCommander/bin/mc: error while loading shared libraries: /i-data/5fe660ed/.PKG/MidnightCommander/lib/libiconv.so.2: file too short
Code: Select all
Startup()
{
# Enable ld-linux.so on NAS5xx
[ ! -f /lib/ld-linux.so.3 -a -f /lib/ld-linux-armhf.so.3 ] && ln -s ld-linux-armhf.so.3 /lib/ld-linux.so.3
for file in /bin/mc /bin/mcview /bin/mcedit
do
if [ "${PKG_FIRMWARE}" = "4" ] ; then
ln -s ${PKG_ROOT}/bin/mc ${file}
else
local libiconv=${PKG_ROOT}/lib/libiconv.so.2
[ ! -f ${libiconv} ] && wget ${PKG_DOWNLOAD_URL}/libiconv.so.2.gz -O - | gunzip >${libiconv}
echo "#!/bin/sh" >${file}
echo LD_LIBRARY_PATH=${PKG_ROOT}/lib:${LD_LIBRARY_PATH} MC_DATADIR=${PKG_ROOT}/share/mc exec ${PKG_ROOT}${file} \"\$@\" >>${file}
chmod a+x ${file}
fi
done
}
MidnightCommander.postinst contains the following code snippet:Mijzelf wrote: Sun 9. Aug 2026, 13:28 Another thing which can be wrong is PKG_DOWNLOAD_URL, which is set installtime by MetaRepository, and points to the URL where the package was downloaded. So that should be http://zyxel.ddnss.eu/Users/Mijzelf/zypkg-repo/fw5 in your case. Unfortunately this mechanism is not bulletproof, and it could point to the wrong URL.
Code: Select all
ExchangeDownloadUrl()
{
if [ -f /tmp/.MetaRepository/tmp/lasturl ] ; then
local url=$(cat /tmp/.MetaRepository/tmp/lasturl )
sed -i "s|^PKG_DOWNLOAD_URL=http://downloads.zyxel.nas-central.org/Users/Mijzelf/fw5|PKG_DOWNLOAD_URL=${url}|" ${PKG_ROOT}/etc/init.d
/${PKG_NAME}
fi
}
It does. MetaRepository puts it there, when downloading a package. But of course that doesn't survive a reboot. In most cases the file is there, but when the firmware package manager gets the zypkg from an internal cache, it might not be there, or point to the wrong origin.admin wrote: Thu 13. Aug 2026, 12:10 The PKG_DOWNLOAD_URL isn't replaced because the file /tmp/.MetaRepository/tmp/lasturl doesn't exist.
I put it in https://zyxel.ddnss.eu/Users/Mijzelf/zy ... m_004.zpkg and changed the package name and md5 accorgingly in https://zyxel.ddnss.eu/Users/Mijzelf/zy ... fw5/ZYPKGS.
I can't extract neither my nor your .zpkg packages neither with firmware nor with Entware tar/gzip packages installed. I get a gunzip error.Mijzelf wrote: Thu 13. Aug 2026, 18:02 It's easy to test. Can you extract the file with firmware tar?
Code: Select all
admin@NAS520:/tmp/test$ wget http://zyxel.ddnss.eu/Users/Mijzelf/zypkg-repo/test/shv/fw5/MidnightCommander_4.6.1_arm_003.zpkg
Connecting to zyxel.ddnss.eu (130.61.246.67:80)
MidnightCommander_4. 100% |*************************************************************************************************************************************************| 780k 0:00:00 ETA
admin@NAS520:/tmp/test$ wget http://zyxel.ddnss.eu/Users/Mijzelf/zypkg-repo/test/shv/fw5/MidnightCommander_4.6.1_arm_004.zpkg
Connecting to zyxel.ddnss.eu (130.61.246.67:80)
MidnightCommander_4. 100% |*************************************************************************************************************************************************| 781k 0:00:00 ETA
admin@NAS520:/tmp/test$ /bin/busybox tar xf MidnightCommander_4.6.1_arm_003.zpkg
admin@NAS520:/tmp/test$ /bin/busybox tar xf MidnightCommander_4.6.1_arm_004.zpkg
admin@NAS520:/tmp/test$ ls -l
-rw-r--r-- 1 admin everyone 798794 Aug 14 09:09 MidnightCommander_4.6.1_arm_003.zpkg
-rw-r--r-- 1 admin everyone 800256 Aug 14 09:09 MidnightCommander_4.6.1_arm_004.zpkg
-rw-r--r-- 1 admin everyone 2198 Aug 14 06:58 control.tar.gz
-rw-r--r-- 1 admin everyone 795645 Aug 14 06:58 data.tar.gz
admin@NAS520:/tmp/test$
Code: Select all
admin@NAS520:/tmp/test$ file MidnightCommander_4.6.1_arm_003.zpkg
MidnightCommander_4.6.1_arm_003.zpkg: gzip compressed data, last modified: Tue Oct 2 14:26:19 2018, max compression, from Unix
admin@NAS520:/tmp/test$ file MidnightCommander_4.6.1_arm_004.zpkg
MidnightCommander_4.6.1_arm_004.zpkg: POSIX tar archive (GNU)