NSA326 meta repo installed but not working





I just installed meta repo by web_prefix http://zyxel.ddnss.eu/Users/Mijzelf/zypkg-repo/
Download successful, installed packages successful.
But after all, apps do not work.
This is the system message:root
@NAS326 :/i-data/ffb0d2f0/.PKG/Transmission/config/Transmission# rsync
/i-data/ffb0d2f0/.PKG/RandomTools/bin/rsync-3.1.1: error while loading shared libraries: /i-data/ffb0d2f0/.PKG/RandomTools/lib/libiconv.so.2: file too short
root
@NAS326 :/i-data/ffb0d2f0/.PKG/Transmission/config/Transmission# mc
/i-data/ffb0d2f0/.PKG/MidnightCommander/bin/mc: error while loading shared libraries: /i-data/ffb0d2f0/.PKG/MidnightCommander/lib/libiconv.so.2: file too short
Then I checked files and they are 0 byte. What went wrong?
Accepted Solution
-
Welcome in the wonderful world of embedded Linux hacking. I compiled those binaries for the NSA series, which have libiconv.so.2 in the library search path. Then ZyXEL came with the NAS series, which doesn't have libiconv.so.2. I could have created different packages for the NSA and the NAS, but instead I decided to put a check in the startscript. For rsync that is in .PKG/RandomTools/etc/custom_startscripts/00tools:
if [ "${PKG_FIRMWARE}" = "4" ] ; then for tool in $RANDOMTOOLS_LIBICONV $RANDOMTOOLS_MAGIC do SymlinkTool $tool done else local libiconv=${PKG_ROOT}/lib/libiconv.so.2 [ ! -f ${libiconv} ] && wget ${PKG_DOWNLOAD_URL}/libiconv.so.2.gz -O - | gunzip >${libiconv} for tool in $RANDOMTOOLS_LIBICONV do ScriptToolEnv $tool "LD_LIBRARY_PATH=${PKG_ROOT}/lib" done for tool in $RANDOMTOOLS_MAGIC do ScriptToolEnv "$tool" "LD_LIBRARY_PATH=${PKG_ROOT}/lib MAGIC=${PKG_ROOT}/share/misc/magic.mgc" done fi
${PKG_FIRMWARE} is 5, on a NAS, and so it checks if libiconv.so.2 exists, and else it downloads it from ${PKG_DOWNLOAD_URL}. That variable should point to the place where the package (RandomTools in this case) was downloaded, what in your case should point to http://zyxel.ddnss.eu/Users/Mijzelf/zypkg-repo/fw5/. But it didn't, or your box wasn't online when you started RandomTools for the first time. That yields a zero byte libiconv, due to the gunzip.
The actual cause is hard to trace, but the remedy is simple. Download libiconv.so.2.gz, and extract it to the right lib directory.
0
All Replies
-
Welcome in the wonderful world of embedded Linux hacking. I compiled those binaries for the NSA series, which have libiconv.so.2 in the library search path. Then ZyXEL came with the NAS series, which doesn't have libiconv.so.2. I could have created different packages for the NSA and the NAS, but instead I decided to put a check in the startscript. For rsync that is in .PKG/RandomTools/etc/custom_startscripts/00tools:
if [ "${PKG_FIRMWARE}" = "4" ] ; then for tool in $RANDOMTOOLS_LIBICONV $RANDOMTOOLS_MAGIC do SymlinkTool $tool done else local libiconv=${PKG_ROOT}/lib/libiconv.so.2 [ ! -f ${libiconv} ] && wget ${PKG_DOWNLOAD_URL}/libiconv.so.2.gz -O - | gunzip >${libiconv} for tool in $RANDOMTOOLS_LIBICONV do ScriptToolEnv $tool "LD_LIBRARY_PATH=${PKG_ROOT}/lib" done for tool in $RANDOMTOOLS_MAGIC do ScriptToolEnv "$tool" "LD_LIBRARY_PATH=${PKG_ROOT}/lib MAGIC=${PKG_ROOT}/share/misc/magic.mgc" done fi
${PKG_FIRMWARE} is 5, on a NAS, and so it checks if libiconv.so.2 exists, and else it downloads it from ${PKG_DOWNLOAD_URL}. That variable should point to the place where the package (RandomTools in this case) was downloaded, what in your case should point to http://zyxel.ddnss.eu/Users/Mijzelf/zypkg-repo/fw5/. But it didn't, or your box wasn't online when you started RandomTools for the first time. That yields a zero byte libiconv, due to the gunzip.
The actual cause is hard to trace, but the remedy is simple. Download libiconv.so.2.gz, and extract it to the right lib directory.
0 -
removed 0byte libiconv.so.2 file from MC and rsync lib directories and copied the downloaded libiconv.so.2, both are successfuly started and run. thx!
0
Categories
- All Categories
- 435 Beta Program
- 2.7K Nebula
- 183 Nebula Ideas
- 120 Nebula Status and Incidents
- 6.2K Security
- 440 USG FLEX H Series
- 299 Security Ideas
- 1.6K Switch
- 80 Switch Ideas
- 1.2K Wireless
- 44 Wireless Ideas
- 6.7K Consumer Product
- 276 Service & License
- 433 News and Release
- 88 Security Advisories
- 31 Education Center
- 10 [Campaign] Zyxel Network Detective
- 4.2K FAQ
- 34 Documents
- 34 Nebula Monthly Express
- 84 About Community
- 91 Security Highlight