benibela / xidel

Command line tool to download and extract data from HTML/XML pages or JSON-APIs, using CSS, XPath 3.0, XQuery 3.0, JSONiq or pattern matching. It can also create new or transformed XML/HTML/JSON documents.
http://www.videlibri.de/xidel.html
GNU General Public License v3.0
681 stars 42 forks source link

Using xidel - linux x32 on Openwrt x86 (virtual box)? "No such file or directory" #114

Closed Baltazar500 closed 5 days ago

Baltazar500 commented 1 week ago

Hi.

I'm trying to use xidel - linux x32 on OpenWRT x86 (virtual box), but I get a "No such file or directory" error when running the binary. What's the problem?

-bash-4.3# strace "/tmp/bin/xidel"
execve("/tmp/bin/xidel", ["/tmp/bin/xidel"], [/* 14 vars */]) = -1 ENOENT (No such file or directory)
brk(0x8cfd000)                          = 0x8cfd000
write(2, "strace: exec: No such file or di"..., 40strace: exec: No such file or directory
) = 40
exit_group(1)                           = ?
+++ exited with 1 +++
benibela commented 1 week ago

It needs a dynamic loader

e.g. the 64-bit version needs:

$ readelf -l  xidel  |  grep interpreter
     [Requesting program interpreter: /lib64/ld-linux-x86-64.so.2]
$ strings | grep ld-linux
     /lib64/ld-linux-x86-64.so.2

Different Linux versions have a different name for that file

Baltazar500 commented 1 week ago

It needs a dynamic loader

Thanks for the tip

In xidel x32 this is ld-linux.so.2 I found the necessary interpreter on OpenWRT and created a symlink /lib/libc.so -> /lib/ld-linux.so.2, which allowed me to run xidel. After installing libopenssl, https support started working. The issue is resolved.

benibela commented 5 days ago

In xidel x32 this is ld-linux.so.2 I found the necessary interpreter on OpenWRT and created a symlink /lib/libc.so -> /lib/ld-linux.so.2,

good, if that solves it

i would have thought the name always starts with "ld- something" not libc