2

I've been trying to install the packages necessary to play with shape recognition with a camera. Virtually all sites recommend using opencv, and tell, like here, here and here, to install it with

apt‐get install python‐opencv

Sometimes with sudo. They drop the command without a second thought, like it should have no reason to fail. The problem is that my apt-get does not find the packages.

$ > sudo apt-get install python‐opencv
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package python‐opencv

I guess I'm missing one or more lines in /etc/apt/sources.list but could not find which ones by STFW. Here's the contents of the file right now, which came default with the install of raspbian:

> cat /etc/apt/sources.list
deb http://mirrordirector.raspbian.org/raspbian/ stretch main contrib non-free rpi
# Uncomment line below then 'apt-get update' to enable 'apt-get source'
# deb-src http://archive.raspbian.org/raspbian/ stretch main contrib non-free rpi

I've tried to uncomment the deb-src line and add the following line I found somewhere, to no avail:

deb http://de.archive.ubuntu.com/ubuntu precise main restricted universe

Running sudo apt-get update works for some time, ignores (lines starting with Ign?) many packages, gets a handful of packages, then gives the following error, which I'm not sure is critical:

W: The repository 'http://de.archive.ubuntu.com/ubuntu precise Release' does not have a Release file.
N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use.
N: See apt-secure(8) manpage for repository creation and user configuration details.
E: Failed to fetch http://de.archive.ubuntu.com/ubuntu/dists/precise/main/binary-all/Packages.gz  Redirection loop encountered
E: Failed to fetch http://de.archive.ubuntu.com/ubuntu/dists/precise/main/binary-armhf/Packages  404  Not Found [IP: 141.30.62.22 80]
E: Some index files failed to download. They have been ignored, or old ones used instead.

I have an 8GB not full SDCard that I formatted by following the instructions under Download NOOBS files then drag and drop here.

What am I missing?

  • try to follow this link: milq.github.io/install-opencv-ubuntu-debian bye. – init0 Oct 26 '17 at 19:20
  • 1
    Your sources list looks OK. Have you recently tried sudo apt-get update? If not, try that, then run the install again. Perhaps your package lists are out of date. – Aurora0001 Oct 26 '17 at 19:37
0

Instead of formatting the SDCard then copying the NOOBS files to it, I flashed it with an image, as described under Download and image Raspbian directly here. Then everything went smoothly.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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