thunderknight99
Posts: 24
Joined: Sun Oct 22, 2017 9:51 am

Unable to Install few packages on Raspberry Pi 3 - Connection Failed on few headers

Sun Oct 22, 2017 10:08 am

I am trying to install Dlib and OpenCV on my Raspberry Pi 3 for some facial recognition based application. But, I have been unable to install the packages successfully I assume since the console returned error messages for the sudo apt-get install command. I am pretty much new to Linux so I haven't been able to figure this out on my own. I suspect that the Raspbian Stretch don't have all the libraries/packages and that's why I am unable to install them. I am following a guide by Adrian Rosebrock (https://www.pyimagesearch.com/2017/05/0 ... pberry-pi/) to install Dlib and I think it was not done on Raspbian Stretch but he wasn't very specific.
I am using PuTTY to access my Raspberry Pi 3 and also I have pinged the repository (mirrordirector) and network seems nothing to do with it. And also I have tried to access the file manually from browser (based on link provided in the error message in console) to see if it actually exists and I got an error page saying file not found, so I think GTK+3 doesn't exist for Raspbian Stretch and maybe accessing Wheezy or Jessie might solve it since I read somewhere that Raspbian Stretch repository doesn't yet have all files. And I don't know how to change it anyway to see if it works.

This is the console command-messages:

Code: Select all

[email protected]:~ $ sudo apt-get install libgtk-3-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
  autoconf automake autopoint autotools-dev dbus dbus-x11 debhelper dh-autoreconf
  dh-strip-nondeterminism gettext gir1.2-atspi-2.0 gir1.2-gdkpixbuf-2.0 icu-devtools
  intltool-debian libarchive-zip-perl libatk-bridge2.0-dev libatk1.0-dev libatspi2.0-0
  libatspi2.0-dev libcairo-script-interpreter2 libcairo2-dev libdbus-1-3 libdbus-1-dev
  libepoxy-dev libfile-stripnondeterminism-perl libfontconfig1-dev libgdk-pixbuf2.0-0
  libgdk-pixbuf2.0-common libgdk-pixbuf2.0-dev libglib2.0-dev libgraphite2-dev
  libharfbuzz-dev libharfbuzz-gobject0 libice-dev libicu-dev libltdl-dev
  libmail-sendmail-perl libpango1.0-dev libpcre3-dev libpcre32-3 libpcrecpp0v5
  libpixman-1-dev libpthread-stubs0-dev libsigsegv2 libsm-dev libsys-hostname-long-perl
  libtimedate-perl libtool libx11-dev libx11-doc libxau-dev libxcb-render0-dev
  libxcb-shm0-dev libxcb1-dev libxcomposite-dev libxcursor-dev libxdamage-dev libxdmcp-dev
  libxext-dev libxfixes-dev libxft-dev libxi-dev libxinerama-dev libxkbcommon-dev
  libxrandr-dev libxrender-dev libxtst-dev m4 po-debconf x11proto-composite-dev
  x11proto-core-dev x11proto-damage-dev x11proto-fixes-dev x11proto-input-dev
  x11proto-kb-dev x11proto-randr-dev x11proto-record-dev x11proto-render-dev
  x11proto-xext-dev x11proto-xinerama-dev xorg-sgml-doctools xtrans-dev
Suggested packages:
  autoconf-archive gnu-standards autoconf-doc dh-make gettext-doc libasprintf-dev
  libgettextpo-dev libcairo2-doc libglib2.0-doc libgtk-3-doc libice-doc icu-doc
  libtool-doc imagemagick libpango1.0-doc libsm-doc gfortran | fortran95-compiler gcj-jdk
  libxcb-doc libxext-doc m4-doc libmail-box-perl
Recommended packages:
  at-spi2-core
The following NEW packages will be installed:
  autoconf automake autopoint autotools-dev debhelper dh-autoreconf
  dh-strip-nondeterminism gettext gir1.2-atspi-2.0 icu-devtools intltool-debian
  libarchive-zip-perl libatk-bridge2.0-dev libatk1.0-dev libatspi2.0-dev
  libcairo-script-interpreter2 libcairo2-dev libdbus-1-dev libepoxy-dev
  libfile-stripnondeterminism-perl libfontconfig1-dev libgdk-pixbuf2.0-dev libglib2.0-dev
  libgraphite2-dev libgtk-3-dev libharfbuzz-dev libharfbuzz-gobject0 libice-dev libicu-dev
  libltdl-dev libmail-sendmail-perl libpango1.0-dev libpcre3-dev libpcre32-3 libpcrecpp0v5
  libpixman-1-dev libpthread-stubs0-dev libsigsegv2 libsm-dev libsys-hostname-long-perl
  libtimedate-perl libtool libx11-dev libx11-doc libxau-dev libxcb-render0-dev
  libxcb-shm0-dev libxcb1-dev libxcomposite-dev libxcursor-dev libxdamage-dev libxdmcp-dev
  libxext-dev libxfixes-dev libxft-dev libxi-dev libxinerama-dev libxkbcommon-dev
  libxrandr-dev libxrender-dev libxtst-dev m4 po-debconf x11proto-composite-dev
  x11proto-core-dev x11proto-damage-dev x11proto-fixes-dev x11proto-input-dev
  x11proto-kb-dev x11proto-randr-dev x11proto-record-dev x11proto-render-dev
  x11proto-xext-dev x11proto-xinerama-dev xorg-sgml-doctools xtrans-dev
The following packages will be upgraded:
  dbus dbus-x11 gir1.2-gdkpixbuf-2.0 libatspi2.0-0 libdbus-1-3 libgdk-pixbuf2.0-0
  libgdk-pixbuf2.0-common
7 upgraded, 76 newly installed, 0 to remove and 98 not upgraded.
Need to get 65.1 kB/37.7 MB of archives.
After this operation, 147 MB of additional disk space will be used.
Do you want to continue? [Y/n] Y
Err:1 http://mirrordirector.raspbian.org/raspbian stretch/main armhf libxfixes-dev armhf 1:5.0.3-1
  Connection failed
Err:2 http://mirrordirector.raspbian.org/raspbian stretch/main armhf libxrandr-dev armhf 2:1.5.1-1
  Connection failed
E: Failed to fetch http://mirrordirector.raspbian.org/raspbian/pool/main/libx/libxfixes/libxfixes-dev_5.0.3-1_armhf.deb  Connection failed
E: Failed to fetch http://mirrordirector.raspbian.org/raspbian/pool/main/libx/libxrandr/libxrandr-dev_1.5.1-1_armhf.deb  Connection failed
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
Any help is greatly appreciated! :)

PS: I'm on a clock right now, this is a college project !

DirkS
Posts: 10130
Joined: Tue Jun 19, 2012 9:46 pm
Location: Essex, UK

Re: Unable to Install few packages on Raspberry Pi 3 - Connection Failed on few headers

Sun Oct 22, 2017 11:12 am

If the libgtk package is not in the repo you would have got a message telling you that.
(unless your apt cache is thoroughly messed up)
Did you run 'sudo apt update' before trying to install?
Did it give any errors or warnings?

BTW: the error messages actually suggest a networking problem

thunderknight99
Posts: 24
Joined: Sun Oct 22, 2017 9:51 am

Re: Unable to Install few packages on Raspberry Pi 3 - Connection Failed on few headers

Sun Oct 22, 2017 11:34 am

Yes I tried sudo apt-get update and it never returned any errors. I can't figure out how it can be network related when around 19 MB was downloaded when I first ran sudo apt-get install libgtk-3-dev . It downloaded many files and only some of the GET failed. I tried navigating to the repo manually to try to find the file but there was no file of that URL. ( I have tried this before to get .tar files and stuff to manually install )

Return to “Troubleshooting”