Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I'm having trouble getting several packages downloaded using apt-get. So far, I've run into this with 'opencv' and 'gstreamer'. With opencv, it will fetch a number of files then return with the error below. I've tried several different mirrors and they all error on the same file(s).

Do you want to continue [Y/n]? y
Get:1 http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ precise/universe libopencvvideo2.3 i386 2.3.1-7 [106 kB]
Get:2 http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ precise/universe libopencv-video-dev i386 2.3.1-7 [129 kB]
Fetched 2,225 B in 0s (11.8 kB/s)        
Failed to fetch http://us-east-1.ec2.archive.ubuntu.com/ubuntu/pool/universe/o/opencv/libopencv-video2.3_2.3.1-7_i386.deb  Size mismatch
Failed to fetch http://us-east-1.ec2.archive.ubuntu.com/ubuntu/pool/universe/o/opencv/libopencv-video-dev_2.3.1-7_i386.deb  Size mismatch
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?

I ran 'apt-cache show libopencv-video*' and got:

Package: libopencv-video2.3
Priority: optional
Section: universe/libs
Installed-Size: 277
Maintainer: Ubuntu Developers <[email protected]>
Original-Maintainer: Debian Science Team <[email protected]>
Architecture: i386
Source: opencv
Version: 2.3.1-7
Depends: libc6 (>= 2.4), libgcc1 (>= 1:4.1.1), libopencv-core2.3, libopencv-imgproc2.3 (= 2.3.1-7), libstdc++6 (>= 4.1.1)
Filename: pool/universe/o/opencv/libopencv-video2.3_2.3.1-7_i386.deb
Size: 105756
MD5sum: b38c0f11f3856d62168b730522a9691b
SHA1: d45cd609ea497ae72858e0f5914134e124261f22
SHA256: 85e72311ede84efbdd17781cdb04f79818a28968c63f407df6c56efe7da5525e
Description-en: computer vision Video analysis library

When i compare the filesize reported (105756) it does not match the size of the 'deb' package when I pull it down with wget.

Any suggestions as to solving this problem short of using wget on each of the failed files and installing them manually?

share|improve this question
    
It is 105756 Bytes where 106 is kB, hence 105.756 kB is 106 kB when rounded. Which is approximately same. –  atenz Jul 19 '12 at 16:31
    
right but the filesize of the file (same exact file) that i download using wget is 103kB. seems like the descriptor isn't being updated to match the files? –  Chris Jul 19 '12 at 18:49
    
The downloaded size seems to change a bit few or hundred KB's ( + or - ) depending on size when downloaded onto Local storage. I had always thought it was for CRC or FEC , but then got confused about the BASE in which bits are stored . If it is so , then i am not sure , probably someone will answer . –  atenz Jul 19 '12 at 18:58
    
I'm wondering if they are corrupt packages. should i not be able to download (wget, etc) then install using "dpkg -i <package>" on ubuntu? If so, i'm getting this: –  Chris Jul 19 '12 at 19:16
    
oot@ubuntu:/home/sysadmin# dpkg -i libgstreamer-plugins-base0.10-dev_0.10.36-1ubuntu0.1_i386.deb dpkg-deb: error: `libgstreamer-plugins-base0.10-dev_0.10.36-1ubuntu0.1_i386.deb' is not a debian format archive dpkg: error processing libgstreamer-plugins-base0.10-dev_0.10.36-1ubuntu0.1_i386.deb (--install): subprocess dpkg-deb --control returned error exit status 2 Errors were encountered while processing: libgstreamer-plugins-base0.10-dev_0.10.36-1ubuntu0.1_i386.deb –  Chris Jul 19 '12 at 19:17

2 Answers 2

It turns out that there is not a problem with apt-get but my company. There is an internet policy that blocks all keywords with 'video' in the url. I discovered this by viewing the contents of the libopencv-video2.3_2.3.1-7_i386.deb in /var/cache/apt/archives/partial. It contained html from the web filter giving me a notice that I'm in violation of my internet blah blah blah.

Who would have known that their lead research engineer would have had a policy applied so trivial as this?

Lesson learned: ask your IT dept to give a block of addresses that are exempt from stupid policies and charge them back for the time wasted by me and those trying to help...

share|improve this answer
5  
Le sigh. Gotta love IT people. –  jrg Jul 20 '12 at 12:50
    
Proxies/firewalls that return spurious HTML with a 200 OK instead of just blocking the connection are the WORST. :( –  izx Jul 20 '12 at 18:27
    
Thanks, @Chris ! Huge help. Now I can stop wondering what the hell was going on. –  hourback Oct 9 at 14:32

I had alot of these problems and I always seem to fix them quite easy.

e.g Failed to fetch http://us-east-1.ec2.archive.ubuntu.com/ubuntu/pool/universe/o/opencv/libopencv-video-dev_2.3.1-7_i386.deb

then I would fetch the package manualy from the main server like: wget http://archive.ubuntu.com/ubuntu/pool/universe/o/opencv/libopencv-video-dev_2.3.1-7_i386.deb notice I removed the us-east stuff. then just run: sudo dpkg -i libopencv-video-dev_2.3.1-7_i386.deb witch should install the package that is bothering you after then just run the orginal command you were tryin should work now...

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.