Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

replace busybox wget with wget

3,122 views
Skip to first unread message

pkumar

unread,
Mar 17, 2011, 8:55:55 AM3/17/11
to
Hello,

hi all
I want to use wget insted of Busybox wget(v1.16.1).
In my application I want to use wget -nc option in order to resume download
and
prevent it from redownloading the file which are previously downloaded. My
current busybox version doesnt support to this option.

Can somebody help me.

jack

unread,
Mar 17, 2011, 12:00:32 PM3/17/11
to

Put a suitable wget executable in /usr/bin (or /usr/local/bin), and use

/usr/bin/wget -nc .....

Depending on what the target is, you might have to cross-compile and/or
link statically; for example on the machine I'm typing this on (Ubuntu
8.04LTS) wget pulls in a lot of .so's that might or might not be
available on the target:

$ ldd `which wget`
linux-gate.so.1 => (0xb7728000)
libdl.so.2 => /lib/tls/i686/cmov/libdl.so.2 (0xb770b000)
librt.so.1 => /lib/tls/i686/cmov/librt.so.1 (0xb7702000)
libssl.so.0.9.8 => /usr/lib/i686/cmov/libssl.so.0.9.8 (0xb76bc000)
libcrypto.so.0.9.8 => /usr/lib/i686/cmov/libcrypto.so.0.9.8 (0xb757a000)
libc.so.6 => /lib/tls/i686/cmov/libc.so.6 (0xb742b000)
/lib/ld-linux.so.2 (0xb7729000)
libpthread.so.0 => /lib/tls/i686/cmov/libpthread.so.0 (0xb7413000)
libz.so.1 => /usr/lib/libz.so.1 (0xb73fe000)
$

-j

pkumar

unread,
Mar 18, 2011, 1:11:42 AM3/18/11
to
Hi Jack,

Thanks for reply.
Actually I am using ubuntu 10.10 and my embedded device has debian linux on
it.
and my partation structure is as follows

Device Boot Start End Blocks Id System
/dev/hda1 * 1 13 104391 b Win95 FAT32
/dev/hda2 14 136 987997+ 83 Linux
/dev/hda3 137 684 4401810 b Win95 FAT32
/dev/hda4 685 972 2313360 5 Extended
/dev/hda5 685 807 987966 b Win95 FAT32
/dev/hda6 808 814 56196 83 Linux
/dev/hda7 815 972 1269103+ b Win95 FAT32

hda2 is my root partation.
So what I did is, I have downloaded wget sourse code and as you suggested that
i
have placed in /usr/bin and from there I tried to compile it. But as there is
no
gcc install I unable to do so. I downloaded gcc but Now I dont hv sufficient
space.

Can you please tell me how can I get suitable execuatable wget or how to
resolve the issue.

Thanks in advanced.

Habib Bouaziz-Viallet

unread,
Mar 18, 2011, 1:54:51 AM3/18/11
to
Le 18/03/2011 06:11, pkumar a écrit :
> Thanks for reply.
> Actually I am using ubuntu 10.10 and my embedded device has debian linux on
> it.
A debian on your embedded sys ... ok download a deb package for your
arch and install it with
dpkg -i mypackage.deb

or much advanced command tool if it's exist on your sys

apt-get install mypackage

hope this helps, Habib

pkumar

unread,
Mar 18, 2011, 5:14:27 AM3/18/11
to

pkumar

unread,
Mar 21, 2011, 4:05:41 AM3/21/11
to
jack wrote on 03/17/2011 11:00 ET :
> pkumar wrote:
>> Hello,
>>
>> hi all
>> I want to use wget insted of Busybox wget(v1.16.1).
>> In my application I want to use wget -nc option in order to resume download
>> and
>> prevent it from redownloading the file which are previously downloaded. My
>> current busybox version doesnt support to this option.
>>
>> Can somebody help me.
>>
>>
>>
> Put a suitable wget executable in /usr/bin (or /usr/local/bin), and use
>
> /usr/bin/wget -nc .
>
> Depending on what the target is, you might have to cross-compile and/or
> link statically; for example on the machine I'm typing this on (Ubuntu
> 8.04LTS) wget pulls in a lot of .so's that might or might not be
> available on the target:
>
> $ ldd `which wget`
> linux-gate.so.1 => (0xb7728000)
> libdl.so.2 => /lib/tls/i686/cmov/libdl.so.2 (0xb770b000)
> librt.so.1 => /lib/tls/i686/cmov/librt.so.1 (0xb7702000)
> libssl.so.0.9.8 => /usr/lib/i686/cmov/libssl.so.0.9.8 (0xb76bc000)
> libcrypto.so.0.9.8 => /usr/lib/i686/cmov/libcrypto.so.0.9.8 (0xb757a000)
> libc.so.6 => /lib/tls/i686/cmov/libc.so.6 (0xb742b000)
> /lib/ld-linux.so.2 (0xb7729000)
> libpthread.so.0 => /lib/tls/i686/cmov/libpthread.so.0 (0xb7413000)
> libz.so.1 => /usr/lib/libz.so.1 (0xb73fe000)
> $
>
> -j
>
Hi jack

can you please tell me how can I make wget executable. or any link from where
I
can get it.

jack

unread,
Mar 21, 2011, 9:41:37 AM3/21/11
to

Elsethread you mentioned the target has some flavor of Debian on it, but
not which version. Without that information, I can't point to a direct
link (not sure if there would be one even with it, but at least it would
point to the right repository).

Does the target have network communication, and can it talk to the
internet? If yes, the solution is as Habib mentioned, 'apt-get install
wget'. That will pull in any dependencies it needs.
If it doesn't have internet connectivity, you need to get the
appropriate wgetXXXX.deb, copy that to the target, and 'dpkg -i
wgetXXXX.deb'. That will probably complain about missing libraries, for
which you also have to find the .deb files.

Alternatively, if you have a development environment where you can
compile programs for the target (or if the target has gcc, make and
friends), you can compile it from source.

Or if you have a desktop set up with the same version Debian that runs
on the target (and the same arch) you can just copy /usr/bin/wget from
there.

-j

pkumar

unread,
Mar 23, 2011, 1:07:32 AM3/23/11
to
pkumar wrote on 03/17/2011 07:55 ET :
Hi all,
Thanks every one (Jack & Habib) for answering my quires.
Your suggestion is really valuable for me.

While searching I got another linux command which can use to resume download,
called nohup.

Busybox is compatible to it and is serving my purpose.

But for the knowledge,
Can anybody tell me what habib had tell me to do "download a deb package
for your
arch and install it with", I unable to get about arch packages. Which arch
packages should I download or how can I get the knowledge about arch packages
required for my system.

Thanks in advanced.

pkumar

unread,
Mar 23, 2011, 1:43:51 AM3/23/11
to
Hay Good Morning Jack,

Sorry I have not seen your reply.
Before seen your message I have post a reply about my problem that using linux
command called nohup I am able to resume download.

Any way your suggestion are valuable to me.

The answer to what you have ask is as below:

Debian Version:
Linux version 2.6.28-RMI-139-DB1200 (root@debian) (gcc version 3.4.4) .
Using YAMON ROM Monitor
MIPS Architecture
Endianness =Little

Network Connectivity:
Yes My target system can connect to the network with wireless INTERNET
service.

Also I have one more question about what you stated in last post


$ ldd `which wget`
linux-gate.so.1 => (0xb7728000)
libdl.so.2 => /lib/tls/i686/cmov/libdl.so.2 (0xb770b000)
librt.so.1 => /lib/tls/i686/cmov/librt.so.1 (0xb7702000)
libssl.so.0.9.8 => /usr/lib/i686/cmov/libssl.so.0.9.8 (0xb76bc000)
libcrypto.so.0.9.8 => /usr/lib/i686/cmov/libcrypto.so.0.9.8 (0xb757a000)
libc.so.6 => /lib/tls/i686/cmov/libc.so.6 (0xb742b000)
/lib/ld-linux.so.2 (0xb7729000)
libpthread.so.0 => /lib/tls/i686/cmov/libpthread.so.0 (0xb7413000)
libz.so.1 => /usr/lib/libz.so.1 (0xb73fe000)
$

With this how can I exactly get which package Is for my system. Can you please
brief something (Actually I am new to linux and just want to learn as much as
I
can)

Habib

unread,
Mar 23, 2011, 4:44:39 AM3/23/11
to
Le 23/03/2011 06:07, pkumar a écrit :
> But for the knowledge,
> Can anybody tell me what habib had tell me to do "download a deb package
> for your
> arch and install it with", I unable to get about arch packages. Which arch
> packages should I download or how can I get the knowledge about arch packages
> required for my system.
>
> Thanks in advanced.

Hi !

I see you're not very familiar with Unix sys, no matter anyway. I see
also your target sys is connected to the internet and a therfore has a
IP adress (something like 192.168.1.55 or something), good point.

So please notice then your embedded target sys can be reached via a
telnet (or ssh) service from your host computer.

1/ Assuming you know your The IP adress of the target you can then
telnet to your embedded sys -> telnet "IP_ad" (password required)

1b/ Via ssh service --> ssh root@IP_ad (password required)

2/ Once you're logged-in make this in command line : "which apt-get"
the sys respons "/usr/bin/apt-get" which means that apt-get is present
on your target sys.

3/If so simply make this : apt-get install wget
which (as Jack said) resolve Libraries dependencies fot this particular
package wget

Presuming wget version MIPS repository is a more advanced version than
the one distributed within Busybox, that's all.

HTP, Habib.

pkumar

unread,
Mar 23, 2011, 6:27:02 AM3/23/11
to

jack

unread,
Mar 23, 2011, 6:31:52 AM3/23/11
to

Good. That means you can use the standard tools the come with the
distribution. Log in to the target using ssh (or telnet), using an
account with enough privileges to be able to do 'sudo'. Then do the
following:

sudo apt-get update
sudo apt-get install wget

It will ask for your password at least once. The first command refreshes
the indexes for the repository, the second installs wget and everything
it needs.

>
> Also I have one more question about what you stated in last post
>
> $ ldd `which wget`
> linux-gate.so.1 => (0xb7728000)
> libdl.so.2 => /lib/tls/i686/cmov/libdl.so.2 (0xb770b000)
> librt.so.1 => /lib/tls/i686/cmov/librt.so.1 (0xb7702000)
> libssl.so.0.9.8 => /usr/lib/i686/cmov/libssl.so.0.9.8 (0xb76bc000)
> libcrypto.so.0.9.8 => /usr/lib/i686/cmov/libcrypto.so.0.9.8 (0xb757a000)
> libc.so.6 => /lib/tls/i686/cmov/libc.so.6 (0xb742b000)
> /lib/ld-linux.so.2 (0xb7729000)
> libpthread.so.0 => /lib/tls/i686/cmov/libpthread.so.0 (0xb7413000)
> libz.so.1 => /usr/lib/libz.so.1 (0xb73fe000)
> $
>
> With this how can I exactly get which package Is for my system. Can you please
> brief something (Actually I am new to linux and just want to learn as much as
> I
> can)

I saw you've found a way out using nohup, but for future reference:

The 'which foo' command searches your current path for an executable or
shell script - it tells you exactly what it would run if you just typed
'foo' on the command prompt.
The ldd command (see man ldd) shows which shared libraries (the unix
version of a .DLL) a particular executable needs to run. Combining the
two (the `` tell the shell to run 'which wget', and then to do the ldd
followed by the result of that) tells me which shared libraries my
default wget needs.

If you typed 'which wget' on your system, it will probably say something
like (Builtin) or nothing at all, whereas 'which sudo' would say
'/usr/bin/sudo'.

-j

pkumar

unread,
Mar 24, 2011, 1:44:11 AM3/24/11
to
>> Linux version 2.6.28-RMI-139-DB1200 () (gcc version 3.4.4) .
Hi jack,

Thanks a lot. It's helping me in improving my knowledge.
0 new messages