I am following the tutorial https://pimylifeup.com/raspberry-pi-webcam-server/ to build a web server for raspberry pi camera stream.
I had the problem: ./motion: error while loading shared libraries: libavformat.so.53: cannot open shared object file: No such file or directory
And after I search for many solutions, one said to install:
sudo apt-get install -y libjpeg62 libjpeg62-dev libavformat53 libavformat-dev libavcodec53 libavcodec-dev libavutil51 libavutl-dev libc6-dev zlib1g-dev libmysqlclient18 libmysqlclient-dev libpq5 libpq-dev
But I got these error:
E: Package 'libjpeg62-dev' has no installation candidate
E: Unable to locate package libavformat53
E: Unable to locate package libavcodec53
E: Unable to locate package libavutil51
I search for long time but don't find solution to install libjepg62-dev.
The reason for this is, these packages have been removed in the latest jessie release. I've figured a way to fix this.
Try the following:
Note: Never pass the -y argument to apt-get install when doing any of the following. It might remove existing packages. So, always confirm the installation manually for every single package you need.
Add the line deb http://mirrordirector.raspbian.org/raspbian/ wheezy main contrib non-free rpi to the file /etc/apt/sources.list at the top.
Do sudo apt-get update.
Install the library: sudo apt-get install libavformat53
Install other libs too like libpq5.
Remember to undo the change you did in step 1. i.e., remove the line and perform sudo apt-get update
Related
I have installed Gazebo 11 on Ubuntu 20.04 through binary packages. When I launch Gazebo it raises the following error:
gzserver: error while loading shared libraries: libdart-collision-bullet.so.6: cannot open shared object file: No such file or directory
Does anyone know what is the problem? I tried to solve the problem installing libdart-collision-bullet-dev, but the following problem raises:
The following packages have unmet dependencies:
libdart-collision-bullet-dev : Depends: libdart-dev but it is not going to be installed
Depends: libdart6-collision-bullet (= 6.9.2-2build4) but 6.9.5-1885~202012292349~ubuntu20.04.1 is to be installed
E: Unable to correct problems, you have held broken packages.
I tried to solve the broken packages, but then Gazebo 11 is automatically uninstalled.
Thanks in advance.
I had the same problem, and this is what worked for me.
First remove and purge all the libdart packages.
sudo apt remove --purge libdart*
If you have added dartsim/ppa ppa from this link, remove it from Software & Updates -> Other Software
Update
sudo apt update
Check if libdart-dev installs with:
sudo apt install libdart-dev
If it installs, then install all the packages required for Gazebo
sudo apt install libdart-all-dev
If there is an error related to unable to fetch some archives, try:
sudo apt update --fix-missing
sudo apt install libdart-all-dev
Install Gazebo again with:
curl -sSL http://get.gazebosim.org | sh
Check if Gazebo is now working
gazebo
I am trying to install kernel-headers but getting this error
E: Unable to locate package linux-headers-5.9.0-kali1-amd64
E: Couldn't find any package by glob 'linux-headers-5.9.0-kali1-amd64'
E: Couldn't find any package by regex 'linux-headers-5.9.0-kali1-amd64'
I have updated and uncommented this line in sources.list
deb-src http://http.kali.org/kali kali-rolling main contrib non-free
but errors thats can't locate regex or glob. what I am missing?
Here's what you may need to do
sudo apt-get update # This will update the repositories list
sudo apt-get upgrade # This will update all the necessary packages on your system
sudo apt-get dist-upgrade # This will add/remove any needed packages
reboot # You may need this since sometimes after a upgrade/dist-upgrade, there are some left over entries that get fixed after a reboot
sudo apt-get install linux-headers-$(uname -r) # This should work now
from what am guessing linux-headers-5.9.0 is not available in the kali repository.
you can always use apt-cache search linux-headers to know if it available
but to update to the latest linux headers
sudo apt-get update
sudo apt-get dist-upgrade
then search for Linux-headers available using apt search Linux-headers.
so you install the latest version using
sudo apt-get install -y linux-headers-$(uname -r)
I've been attempting to install the package r-base on Ubuntu Trusty Tahr and there's a package dependency that became broken in the last week.
My commands are as follows:
apt-get update -y
apt-get dist-upgrade -y
apt-get install -y r-base-dev
...
Err http://archive.ubuntu.com/ubuntu/ trusty-security/main libpng12-dev amd64 1.2.50-1ubuntu2.14.04.1
404 Not Found [IP: 91.189.91.23 80]
Fetched 92.8 MB in 28s (3262 kB/s)
E: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/libp/libpng/libpng12-dev_1.2.50-1ubuntu2.14.04.1_amd64.deb 404 Not Found [IP: 91.189.91.23 80]
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
The command '/bin/sh -c sudo apt-get install -y r-base-dev' returned a non-zero code: 100
I have attempted to pass --fix-missing and --ignore-missing but it still fails.
It appears that the package was removed on Jan 8, 2016 due to a security patch: https://launchpad.net/ubuntu/+archive/primary/+sourcepub/5711916/+listing-archive-extra
Looking at http://archive.ubuntu.com/ubuntu/pool/main/libp/libpng/ confirms that the ubuntu2.14.04.1 file is not there but 1.2.50-1ubuntu2.14.04.2 is present.
How do I fix that?
My goal is to get r-base to install.
If I could somehow make it use the version "2" file instead of "1" it would presumably find the file and proceed happily, but I'm not sure how to make apt-get do that.
Alternatively, maybe it's possible to update the dependency list on my side? Or is it up to the r-base maintainers to do so?
Or third, is it possible to add a repository that still has the old package? I'm not running on an AMD processor, so I shouldn't need this particular package at runtime anyway.
Update:
The solution that worked for me was to explicitly remove the package with the broken dependency, download the updated version, and re-install it before running apt-get update.
$ apt-get remove -y libpng12-0
$ curl -O http://archive.ubuntu.com/ubuntu/pool/main/libp/libpng/libpng12-0_1.2.50-1ubuntu2.14.04.2_amd64.deb
$ dpkg -i libpng12-0_1.2.50-1ubuntu2.14.04.2_amd64.deb
$ apt-get update -y
The problem apparently doesn't have much to do with the r-base or r-base-dev packages, even though r-base-dev incidentally depends on libpng12.
In my opinion this problem will probably fix itself in a couple of days. However if you can't wait, here's what you can do.
First, find out which version of libpng the package you want to install depends on.
$ apt-cache depends r-base
r-base
Depends: r-base-core
Depends: r-recommended
Recommends: r-base-html
Recommends: r-doc-html
Suggests: ess
|Suggests: r-doc-info
Suggests: r-doc-pdf
r-base itself does not depend on libpng but r-base-core probably does.
$ apt-cache depends r-base-core | grep png
Depends: libpng12-0
Now we want to know which specific version of libpng
$ apt-cache show r-base-core
... libpng12-0 (>= 1.2.13-4) ...
If you locate this package in Ubuntu's repositories, you can
download it and try to install it manually.
$ wget <url>
$ sudo dpkg -i <filename>
and then install r-base with apt-get install r-base. However if dpkg
refuses to install libpng you should not force it, because it means the
package is not installable and it would break other dependencies.
I am trying to install libgtk2.0-dev on my Raspberry Pi 2 running on latest raspbian. When I use the command sudo apt-get install libgtk2.0-dev, I get the following dependency errors:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
libgtk2.0-dev : Depends: libpango1.0-dev (>= 1.20) but it is not going to be installed
Depends: libcairo2-dev (>= 1.6.4-6.1) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
I tried fixing the broken packages using sudo apt-get install -f, sudo apt-get update, sudo apt-get upgrade and then sudo apt-get install libgtk2.0-dev. It still didn't work. I tried apt-get install on the dependencies and their dependencies, but the result is the same. The solutions in link1 and link2 did not help either.
My source.list contains:
deb http://mirrordirector.raspbian.org/raspbian/ jessie main contrib non-free rpi
deb http://archive.raspbian.org/raspbian jessie main contrib non-free rpi
Am I missing something in my source.list? How can I resolve this?
apt-cache policy libgtk2.0-dev libpango1.0-dev libcairo2-dev showed that the problem was with /etc/apt/sources.list.d/raspi.list.
raspi.list contained deb http://archive.raspberrypi.org/debian/ wheezy main. Changed wheezy to jessie, ran apt-get update and then running apt-get install libgtk2.0-dev worked.
Use aptitude instead:
sudo aptitude install libglib2.0-dev
I am trying to install the linux-headers for my Kernel Version 3.4.61+ and Debian Version 7.1
I typed this Commands:
apt-get update
apt-get install linux-headers-$(uname -r)
On the last command I always get an Error:
E: Unable to locate package linux-headers-3.4.61
E: Couldn't find any package by regex 'linux-headers-3.4.61'
btw: It´s all based on a Cubietruck/Cubieboard3
Here's what you may need to do
sudo apt-get update # This will update the repositories list
sudo apt-get upgrade # This will update all the necessary packages on your system
sudo apt-get dist-upgrade # This will add/remove any needed packages
reboot # You may need this since sometimes after a upgrade/dist-upgrade, there are some left over entries that get fixed after a reboot
sudo apt-get install linux-headers-$(uname -r) # This should work now
You could search first, then choose the closest one.
For example, on my system:
$ apt-cache search linux-headers
linux-headers-3.2.0-4-all - All header files for Linux 3.2 (meta-package)
linux-headers-3.2.0-4-all-amd64 - All header files for Linux 3.2 (meta-package)
linux-headers-3.2.0-4-amd64 - Header files for Linux 3.2.0-4-amd64
So I can install any one of these three.
Heres my experience with this problem:
I installed Kali Linux from a live memory stick. Whilst installing I didn't have an internet connection.
This meant that my sources.list file was set to "Default Off-line Install Values". This meant that when installing I was limited to just the packages and data from the memory stick I Initially installed from.
To fix this, you need to change your sources.list (called switching branches):
Open terminal:
nano /etc/apt/sources.list
This opens the sources file
Now at the top of the file paste in the following two lines:
deb http://http.kali.org/kali kali-rolling main non-free contrib
deb-src http://http.kali.org/kali kali-rolling main non-free contrib
Press CTRL + X then Press Y and Enter to save the file.
Now you can type the following commands to update Kali:
sudo apt-get update
sudo apt-get upgrade
sudo apt-get dist-upgrade
reboot
And finally, you should now be able to...
sudo apt-get install linux-headers-$(uname -r)
This is just my unique experience with this error stemming from an offline install.
I hope this helps someone else out there.
Reference
Check the Source.list file to contain the repository entries.
You can find them at - https://docs.kali.org/general-use/kali-linux-sources-list-repositories.
After editing the file, save it and run "apt-get update && apt-get upgrade". Now run "apt-get install linux-headers-$(uname -r)"
For latest version of kali linux do the following to install vbox guest additions.
Update the packages
# apt-get update
Command to install virtualbox guest additions
# apt-get install -y virtualbox-guest-x11
Reboot
# reboot
Enjoy!
Now you have successfully installed guest OS additions and you can verify that by toggling full-screen it should now stretch to your screen resolution.
Source: Kali Linux Official (Docs - VirtualBox guest additions)
Just Use:
sudo apt-get install linux-headers-generic
if you are on a Desktop installation. The apt-get will solve the dependencies and install the correct version of kernel headers.