Install linux-headers on debian unable to locate package - linux

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.

Related

Installing kernel headers packages missing error

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)

sudo apt-get-repository: command is not found in debian linux

I was going to install firefox to debian linux. I used ubuntu command
sudo add-apt-repository ppa:mozillateam/firefox-next
but i faced some errors it said
sudo apt-get-repository: command is not found.
So i cannot go forward to install firefox to my debian linux..
Could anyone tell me how to skip this problem and how to install firefox to debian
I suggest you check the Debian version what you're using. Debian by default comes with Iceweasel web browser instead of Firefox.
How to install firefox in Debian Jessie,
Add Mozilla Archive to APT Repositories
Open a terminal as root, and add a new file to /etc/apt/sources.list.d/ directory.
$ touch /etc/apt/sources.list.d/debian-mozilla.list
edit this file in editor, deb http://mozilla.debian.net/ jessie-backports firefox-release
Add the Mozilla Archive Key
This line adds mozilla.debian.net archive to your list of archives. Since the packages at mozilla.debian.net are signed, running apt-get update now will spit out a key not found the error. To add the key you need to download the pkg-mozilla-archive-keyring package, and install it. The package requires that debian-keying package be installed.
commands,
$ cd ~/
$ wget mozilla.debian.net/pkg-mozilla-archive-keyring_1.1_all.deb
$ dpkg -i pkg-mozilla-archive-keyring_1.1_all.deb
Install Firefox, update the archives and install Firefox:
commands,
$ apt-get update
$ apt-get install -t jessie-backports firefox
After doing all the above steps you installed the Firefox.
Installing Firefox browser on Debian wheezy
Edit your /etc/apt/sources.list file and add the following line.
deb http://packages.linuxmint.com debian import
Update your package list.
$ apt-get update
The above command will fetch mint package repository list. As a last step install firefox browser.
$ apt-get install firefox
Debian Jessie and later, another information if you use Jessie then it can be found in the software-properties-common package:
sudo apt-get install software-properties-common
Whereas in Debian Wheezy and earlier, The apt-get program add-apt-repository is available in Debian.
That is located in the package: python-software-properties
sudo apt-get install python-software-properties
Actually, added to that package in version 0.75. The current version in Debian Stable ('squeeze") is 0.60, so it doesn't have it. The version currently in Debian Testing ("wheezy") is 0.82.7.1debian1, so it's available there
I request you to go through this question, it will help you.

How to install libjpeg62-dev on Raspberry Pi?

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

About Updating linux-headers

I did dist-upgrade on kali 2.0, after update when i tried to reboot it waited too long i thought it locked or something.
I manually turn off pc.
After restart it was working normally but when i try to install something manually(with make) then i realize my mistake.
make[1]: *** /lib/modules/4.3.0-kali1-amd64/build: No such file or directory. Stop.
That error showed up when i try to make,
After that i try to install linux-headers with that command,
apt-get install -y linux-headers-$(uname -r)
but i was getting another error. It was says like "There's no package". I dont remember exactly.
old uname -r
4.3.0-kali1-amd64
and i installed new headers,
4.4.0-kali1-amd64
Now there is 2 directory in /lib/modules/
4.3.0-kali1-amd64/ 4.4.0-kali1-amd64/
When i write uname -r it still show me old header(4.3.0-kali1-amd64)
I tried to update-initframs -u but didnt worked.
When i try to make it still say same error
make[1]: *** /lib/modules/4.3.0-kali1-amd64/build: No such file or directory. Stop.
How can i fix it ?
Thank in advance
I think you probably meet this problem that lack of linux headers when you install the VMware Tools.
In fact, there's new way to solve the issue in official Kali website: http://docs.kali.org/general-use/install-vmware-tools-kali-guest.
As the tutorial says, if your version of VMware is after Sept 2015, you can use the following code to install it:
apt-get update
apt-get install open-vm-tools-desktop fuse
reboot
Then, you may find you can use the VMware Tools and with the linux-headers updating.
Heres my experience with this problem - using hardware not VM.
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 - https://www.kali.org/docs/general-use/kali-linux-sources-list-repositories/

Install Gnome in Debian in VM of MACOS

I have tried to install Gnome in by using this below code
apt-get install aptitude tasksel
tasksel install gnome-desktop --new-install
When Instaling packages it get failed:
tasksel apt-get failed(100)
Problem #1 - Held packages
It could be because you have some packages which are held and cause conflicts with new version of Gnome you are trying to install. please run following command
# apt-get install gnome-desktop-environment
if it tells you something about such conflicts feel free to run the following command
# aptitude
and press g and that will list the packages to be removed press g once more to perform the removal.
now try again the following
# tasksel gnome-desktop
Problem #2 Low disk space
You might be having low disk space in your partition mounted as / (root) run the following to check
# df -h
if the available space is too less, you can manually free some space if possible. Also run the following to free up some more space
# apt-get clean
# apt-get autoremove
and then retry tasksel gnome-desktop
Hope that helps.
Before downloading anything, you should update your package database with:
# apt-get update
Then try to
# apt-get install gnome-desktop-environment
Remember that you should run all apt-get commands as root.
You can follow this article http://namhuy.net/1085/install-gui-on-debian-7-wheezy.html to install Gnome in Debian
Aptitude is an Ncurses based FrontEnd to Apt, the debian package manager.
Tasksel is a tool that installs multiple related packages as a co-ordinated “task” onto your system.
# apt-get install aptitude tasksel
Install gnome on debian
# tasksel install gnome-desktop --new-install

Resources