Ubuntu calls an external camera and package has no installation candidate, unable to locate package solution

In the past few months, I have started deep learning embedded development, and started to combine software and hardware. I encountered many problems (hardware and software), and I was too busy to update my mood. Now I have finished programming the system and generated onnx at the same time. And rknn, debugged the ubuntu system with the development board configured, and planned to call the camera of the development board to run the cv algorithm.
First connect the camera, network cable (make sure you can access the Internet after connecting), power cable, etc.
Calling the camera through camorama or cheese are two common methods. If there are any special cameras such as infrared thermal cameras, it is recommended to find the technical consultant of the merchant first, but the demos of some merchants’ cameras are messy and confusing, and they cannot provide strong technical questions and answers. Tinkering, trial and error, don't ask me how I know.
Using the application camorama
1. In the terminal type

ls /dev/video*

If the output /dev/video0 /dev/video1 /dev/video2 /dev/video3 ... means that it can be called, and the interface, resolution, etc. will be displayed

2. Using the app camorama, enter

sudo apt-get install camorama

After the installation is complete, enter in the terminal

camorama

The video information can be displayed
(if you specify to open video2, enter the command: camorama -d /dev/video2)

Or: use the app eggplant (cheese)
1. Enter the command:

sudo apt-get install cheese

(If you specify to open video1, enter the command: cheese -d /dev/video1)

2. After installing, use the command:

cheese

In the above two methods, it is easy to make mistakes in the sudo apt-get install step. The two main mistakes are listed below, which tossed me. . .
The first type of error "package has no installation candidate" has the following two reasons:
1. The download source of apt has not been updated

apt-get update
apt-get upgrade
apt-get install <packagename>

Use the above three commands
to update the software package and software source
. If it still doesn’t work after executing this command, it may be that the software source file /etc/apt/sources.list is wrong, so see the following method

2. The file /etc/apt/sources.list is wrong.
Back up first, and then replace the software source with the domestic source

backup:

sudo  cp   /etc/apt/sources.list   /etc/apt/sources.list.bak

Revise:

sudo vim /etc/apt/sources.list

Delete all the content in sources.list, and add the following Ali sources (Tsinghua sources, ubuntu official sources, etc. are also recommended on the Internet. After investigation, Ali sources are the best)

deb http://mirrors.aliyun.com/ubuntu/ groovy main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ groovy main restricted universe multiverse

deb http://mirrors.aliyun.com/ubuntu/ groovy-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ groovy-security main restricted universe multiverse

deb http://mirrors.aliyun.com/ubuntu/ groovy-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ groovy-updates main restricted universe multiverse

deb http://mirrors.aliyun.com/ubuntu/ groovy-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ groovy-backports main restricted universe multiverse

The following two are pre-release software sources, it is not recommended to enable them, so just add the above ones

deb http://mirrors.aliyun.com/ubuntu/ groovy-proposed main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ groovy-proposed main restricted universe multiverse

Then esc, save with: wq, and then

apt-get install ...

If there is still an error, it means that the software package and software source have not been updated, just execute the instructions in the first step:

apt-get update
apt-get upgrade
apt-get install <packagename>

The second type of error , if unable to locate package appears...

apt-get update
apt-get upgrade

If neither of the previous two works, enter:

sudo apt-get install aptitude

After success:

sudo aptitude install .....

These are the hurdles I have encountered in the past two days.

Guess you like

Origin blog.csdn.net/qq_52381360/article/details/130405423