About Updating linux-headers - linux

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/

Related

Launching "sudo dpkg --configure -a" restarts the pc and does not solve anything

running a OpenCV-based code on Ubuntu, I incurred in the following error:
OpenCV Error: Unspecified error (The function is not implemented.
Rebuild the library with Windows, GTK+ 2.x or Carbon support.
If you are on Ubuntu or Debian, install libgtk2.0-dev and pkg-config, then
re-run cmake or configure script) in cvNamedWindow, file /home/opennao/src/OpenCV-2.3.1/modules/highgui/src/window.cpp, line 275
terminate called after throwing an instance of 'cv::Exception'
So I tried to install this libgtk2.0-dev by typing:
sudo apt-get install libgtk2.0-dev
but it returns the following:
E: dpkg was interrupted, you must manually run 'sudo dpkg --configure -a' to correct the problem."
And this is what I did. But then, during the processing of the command request, the pc restarts on its own and the problem comes again when I run my code.
For the sake of clarification, I think it's worth saying that two weeks ago an update on Ubuntu corrupted my grub to choose the OS to run (there are Ubuntu 14.04 and Windows 10 on my pc), so I restored it through minimal-bash line editing.
Now, when I run "sudo dpkg --configure -a" I see that the last printed lines before restarting refer to some information about disk images or kernels that I rembember to have handled to fix the grub. I don't know if this can be a suggestion to understand the problem.
Thank you all for your support, ask me if you need further details.

Error with swift command in terminal in ubuntu 15.04

I installed the open sourced version of Swift from swift.org for Ubuntu 15.10, but I am running Ubuntu 15.04 in my machine. Now when I executed the swift command in the terminal it raising the following error.
swift/usr/bin/repl_swift:error while loading shared libraries:
libicuuc.so.55: cannot open shared object file: No such file or
directory
error: failed to stop process at REPL breakpoint
I ran the following command to ensure libicu52 is installed.
sudo apt-get install libicu52
Please help me to sort out this problem.
Thanks in advance.
Try this one
wget http://security.ubuntu.com/ubuntu/pool/main/i/icu/libicu55_55.1-7_amd64.deb
sudo dpkg -i libicu55_55.1-7_amd64.deb
It worked for me
For newer versions where it complains about libicuuc.so.57: cannot open shared object file (version 57), use the following:
sudo wget http://security.ubuntu.com/ubuntu/pool/main/i/icu/libicu57_57.1-6ubuntu0.3_amd64.deb
sudo dpkg -i libicu57_57.1-6ubuntu0.3_amd64.deb
In general, you can search here for the version you need.
I tried this as well
apt-get install libicu-dev
It worked for me
You don't need libicu-dev unless you are building Swift from source. The problem is that, as pointed out by gengisdave, libicu52 is installed on the machine, but libicu55 is required. A few things you might try:
See if apt-get install libicu55 is going to install the needed version.
Install the binary distribution intended for Ubuntu 14.04. That one requires libicu52, which you do have on the system. This may or may not work, and if it does at first, it may break unexpectedly later depending on what you are doing.
This is even worse, but you might try it if you are just experimenting. Use dpkg -L libicu52 to find out where libicuuc.so.52 is located and create a symlink to it, named libicuuc.so.55, in the same directory.
Before the 8th of December this used to work
echo "deb http://security.ubuntu.com/ubuntu xenial-security main" | sudo tee --
append /etc/apt/sources.list
sudo apt-get update
sudo apt-get install libicu55

install latest version of R 3.2.1 (World-Famous Astronaut) on Linux Mint 17.1 (MATE)

I just switched from Mac to Linux, so while I have a basic understanding of Linux structure, there are still some things Im trying to clear up. This is one of them.
I have tried multiple ways (referencing multiple forum posts) to install the latest version of R (3.2.1 "World-Famous Astronaut") on Linux Mint 17.1 (MATE).
I tried different sources lists, the most recent being:
deb http://cran.rstudio.com/bin/linux/debian wheezy-cran3/
but when I call:
apt-cache showpkg r-base-dev
with each of the ones I try, I always get:
3.0.2-1ubuntu1
as the most recent one available.
Also, my sources.list only contains that above deb, so I do not think its a /etc/apt/preferences/ issue.
Has anyone been able to install 3.2.1 on Linux Mint?
Thanks in advance!
Tom
Briefly:
Did you also run sudo apt-get update ?
Look at apt-cache policy r-base-dev which will shows which versions apt "knowns"
Mint ain't Debian so hell may still break loose ...
Ok, I figured it out. Thanks for all the help! I will post an answer here for anyone else trying to figure this out:
First I ran:
sudo gedit /etc/apt/sources.list
to get into my sources.list. To that I added:
deb http://cran.rstudio.com/bin/linux/debian wheezy-cran3/
and then added the key: (thanks Dirk for the suggestion):
sudo apt-key adv --keyserver keys.gnupg.net --recv-key 381BA480
sudo apt-get update
then when I ran:
apt-cache showpkg r-base-dev
to see the available packages. The top one was:
Package: r-base-dev
Versions:
3.2.1-1~wheezycran3.0(/var/lib/apt/lists/cran.rstudio.com_bin_linux_debian_wheezy-cran3_Packages)
so, finally I ran:
sudo apt-get install -f r-base=3.2.1-1~wheezycran3.0
which worked great!

How to install R 3.1.2 on Linux Mint 17.1

I have installed the latest version of Linux Mint (17.1) in my computer. I installed R version 3.0.2. However, when I try to install the package xslsx, or dplyr, the system says that these packages are unavailable for the R version I have, and that the shall be installed on the R 3.1.2 version. 've been trying to upgrade R from all the possible means but I haven't had a sucessful result. Is anyone experiencing the same problem?
Follow the instructions posted here: How to upgrade R in ubuntu?
Note that Linux Mint 17.1 relies upon the Ubuntu Trusty package base, so you will need to use trusty/ as the Ubuntu version. Also, make sure to use the command sudo apt-get upgrade r-base at the end of the procedure, not just sudo apt-get upgrade, otherwise R won't be upgraded.
Your question may be considered off-topic, but it can be helpful to other Mint users.
Hope this will help, your question helped me alot... Note that Linux mint is based on ubuntu trusty...
sudo su
echo "deb http://www.stats.bris.ac.uk/R/bin/linux/ubuntu trusty/" >> /etc/apt/sources.list
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E084DAB9}
sudo apt-get upgrade r-base
apt-get update
apt-get upgrade
Version specific installation using source code is much different than the installation using YUM or APT. It depends on OS version and the number of dependencies that need to be met for the installation to complete successfully. I have documented the installation of R 3.3.3 on SLES11 SP3 in http://hashprompt.blogspot.com/2017/06/installation-of-r-on-suse-linux.html Hope that it might help you install on linux systems.
I can't figure out how to install properly from the tar.gz file linked from the main R page. I download it, I run ./configure make, and it installs to my Downloads folder. Couldn't figure out how to install it properly elsewhere (must be easy, but I'm green on these things -- advice appreciated), and RStudio, e.g., doesn't know to look in my Downloads folder for the current version (also probably not the most robust approach).
Instead, I was able to grab the last r-base-dev .deb file from trusty here/xenial here, which handles installation automatically.
R versions 3.5+ have changed directories:
trusty
xenial

Install linux-headers on debian unable to locate package

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.

Resources