opkg has wget error code 3 when installing gcc-mips via internet from software/latest:-(

Delbert Franz ddf at iqdotdt.com
Tue Sep 11 19:32:04 EDT 2012

On Tue, 11 Sep 2012 22:59:31 +0200
David Kuehling <dvdkhlng at gmx.de> wrote:

> >>>>> "Delbert" == Delbert Franz <ddf at sonic.net> writes:
> > Hi, all, Well, I'm back to updating my NN to the latest image.
> > Everything has gone well until I tried to:
> > opkg update opkg install gcc-mips
> > The download gets started well but then after about 15 seconds or so,
> > a return code of 3 from wget stops the install.  This return code
> > translates into a file I/O error as far as I can figure out:) 
> Not sure, but I think that the openwrt OS downloads temporary files into
> the ramdisk at /tmp or /var.  Both the package list (opkg update) and
> the gcc-mips package thus have to fit into the remaining free RAM to
> make the installation work.
> Does installation work if you kill gmenu2x first (or launch 'ash' from
> gmenu2x which has a similar effect)?
> Does it work if you add a swap partition or swap file via micro-SD?
> cheers,
> David

I should have mentioned that I do not use gmenu2x but work from the 
command line:-) I have a swap partition of about 62 MB enabled and it 
appears when I run htop.  The gcc-mips package has about 18 MB in it.  
I suspect there is inadequate space if that is all stored in RAM plus 
the workings of opkg plus the parts of the OS needed to make things 
work:-) All the other packages were tiny compared to this one.  I 
installed it in the past but cannot remember if I encountered 
problems.  Everything works if I download to /root and then install 
from there.  

Thanks for the quick response.  I tried a number of things to see
if I could find the source of the problem:

0. I used "opkg remove gcc-mips" to remove the package. 

1. I noticed that I had option "force_space" at the end of the opkg.conf
file in my prior install (which resides on backup and on another SD card).
I added that and it did no good.  I also tried --force_space on the 
command-line for opkg--did no good.

2. I removed var and then declared it as a stand-alone directory.  That did
no good either.  Tried various things with tmp and adding temp and pointing
var to it.  Same result: failure of wget with return code 3.

3. Using the --cache <dir name> option also failed to solve the problem. 

3. Asking opkg to only download fails also.  It cannot even do the simple
download without breaking out with a return code of 3 from wget!

4. Finally I used wget directly, painfully typing the full URL.  Fortunately
I got it right the first time:-)  The gcc-mips package downloaded in about 40 secs.
Then the install went through with some complaints about already existing files. 
Looks like opkg remove did not quite remove everything.  However, the errors
had no effect and the compiler works. 

Well, enough time on this.  There is something not quite right with opkg:
it appears to not treat "force_space" properly, it also seems to ignore 
the "--cache" option (at least the way I understand it), and it cannot 
even download only gcc-mips. 

We have a work-around both onboard the NN (a bit painful to type the rather
long url's) and via the connecting computer by downloading the large packages
first to the "disks" and then doing the install. 


More information about the discussion mailing list