replace busybox wget with wget

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.

Reply to
pkumar
Loading thread data ...

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

Reply to
jack

pkumar wrote on 03/17/2011 07:55 ET :

and

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.

Reply to
pkumar

Le 18/03/2011 06:11, pkumar a écrit :

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

Reply to
Habib Bouaziz-Viallet

Habib Bouaziz-Viallet wrote on 03/18/2011 00:54 ET :

Reply to
pkumar

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

Reply to
pkumar

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

Reply to
jack

pkumar wrote on 03/17/2011 07:55 ET :

and

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.

Reply to
pkumar

download

where

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)

Reply to
pkumar

Le 23/03/2011 06:07, pkumar a écrit :

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.

Reply to
Habib

Habib wrote on 03/23/2011 03:44 ET :

Reply to
pkumar

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.

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

Reply to
jack

My

linux

please

as

Hi jack, Thanks a lot. It's helping me in improving my knowledge.

Reply to
pkumar

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.