Unable to start Virtual Box in redhat 6.5 - linux

I have installed virtual box - VirtualBox-5.1-5.1.22_115126_el6-1.x86_64.rpm in redhat 6.5 but while starting virtual box, I am getting "Segmentation fault (core dumped) error.
"
From /var/log/messages:
May 22 20:12:07 MSS-SWM abrtd: send-mail: error while loading shared
libraries: libmysqlclient.so.16: cannot open shared object file: No
such file or directory May 22 20:12:07 MSS-SWM abrtd: Error running
'/bin/mailx' May 22 20:12:07 MSS-SWM abrtd: 'post-create' on
'/var/spool/abrt/ccpp-2017-05-22-20:11:55-141657' exited with 1 May 22
20:12:07 MSS-SWM abrtd: Deleting problem directory
'/var/spool/abrt/ccpp-2017-05-22-20:11:55-141657' May 22 20:21:24
MSS-SWM kernel: VirtualBox[143266]: segfault at 0 ip 00007fddf7914781
sp 00007fffa28a7b70 error 4 in
libQt5CoreVBox.so.5[7fddf7850000+598000]
could you please help on this.

The following is presented in the link I provided in my comments:
add virtual box repo
# cd /etc/yum.repos.d/
# wget http://download.virtualbox.org/virtualbox/rpm/rhel/virtualbox.repo
install dependencies
# yum update
# yum install binutils qt gcc make patch libgomp glibc-headers glibc-devel kernel-headers kernel-devel dkms
If you don't have access to the internet, but do have the CentOS DVD, try
mounting the DVD to your system (to /media/cdrom/ for example)
running yum to install the rpm packages from the DVD as such:
yum --disablerepo=* --enablerepo=c5-media install binutils qt gcc make patch libgomp glibc-headers glibc-devel kernel-headers kernel-devel dkms

Related

VirtualBox: Kernel driver not installed (rc=-1908) | Fedora 36

After full reinstalling Fedora to version 36 I have got this error:
Kernel driver not installed (rc=-1908)
The VirtualBox Linux kernel driver is either not loaded or not set up correctly. Please try setting it up again by executing
'/sbin/vboxconfig'
as root.
If your system has EFI Secure Boot enabled you may also need to sign the kernel modules (vboxdrv, vboxnetflt, vboxnetadp, vboxpci) before you can load them. Please see your Linux system's documentation for more information.
where: suplibOsInit what: 3 VERR_VM_DRIVER_NOT_INSTALLED (-1908) - The support driver is not installed. On Linux, open returned ENOENT
Commands from other topics don't work:
sudo dnf reinstall kernel-devel kernel-headers dkms qt5-qtx11extras elfutils-libelf-devel zlib-devel
systemctl restart vboxdrv
sudo dnf reinstall VirtualBox-6.1
sudo /sbin/vboxconfig
What do I need to do? Thanks
Please try:
$ sudo dnf -y install #development-tools
$ sudo dnf install kernel-headers kernel-devel dkms -y
The problem maybe it is that the kernels have different versions on devel and headers. You should probably check this right before everything else.
Now if you want to create a virtual machine based on Linux, I strongly recommend you to use "KVM", it's the easiest way and it should work without any trouble.
This is related: rc-1908
you just need to install the "linux-devel" packages (worked in fedora 37)
sudo dnf install linux-devel

Installing CUDA 7.5 on CentOS 7 - Unable to locate the kernel source

First of all, all of this is done as root. I've been trying to install the CUDA 7.5 drivers on a CentOS 7 SATA DOM. The issue I'm running into is the following:
Installing the NVIDIA display driver...
The driver installation is unable to locate the kernel source. Please make sure that the kernel source packages are installed and set up correctly.
If you know that the kernel source packages are installed and set up correctly, you may pass the location of the kernel source with the '--kernel-source-path' flag.
I have tried to point to the kernel source path (I may be pointing to the wrong path; I'm a new Linux user) with the following command:
$ ./cuda_7.5.18_linux.run --kernel-source-path=/usr/src/kernels/3.10.0-327.18.2.el7.x86_64
Same issue as before. I've read online that other people with this issue is due to kernel version mismatch. That, however is not the case:
$ uname -r
3.10.0-327.18.2.el7.x86_64
$ rpm -q kernel-devel kernel-headers
kernel-devel-3.10.0-327.18.2.el7.x86_64
kernel-headers-3.10.0-327.18.2.el7.x86_64
$ ls /usr/src/kernels
3.10.0-327.18.2.el7.x86_64
$ ls /usr/src/kernels/3.10.0-327.18.2.el7.x86_64/
arch block crypto drivers firmware fs include init ipc Kconfig kernel lib Makefile mm Module.symvers net samples scripts security sound System.map tools usr virt vmlinux.id
I've also tried to install different versions of gcc and still no dice.
Any help would be appreciated.
Thanks.
I figure it out. It turns out I needed to install DKMS from the EPEL repository. Here are the commands I used:
sudo yum install epel-release
yum install --enablerepo=epel dkms

Could not insert 'nvidia_352': No such device

I am trying to run caffe on Linux Ubuntu.
After installation, I run caffe in gpu and the error is
I0910 13:28:13.606891 10629 caffe.cpp:296] Use GPU with device ID 0
modprobe: ERROR: could not insert 'nvidia_352': No such device
F0910 13:28:13.728612 10629 common.cpp:142] Check failed: error == cudaSuccess (38 vs. 0) no CUDA-capable device is detected
*** Check failure stack trace: ***
# 0x7ffd3b9a7daa (unknown)
# 0x7ffd3b9a7ce4 (unknown)
# 0x7ffd3b9a76e6 (unknown)
# 0x7ffd3b9aa687 (unknown)
# 0x7ffd3bf91cb5 caffe::Caffe::SetDevice()
# 0x40a5a7 time()
# 0x4080f8 main
# 0x7ffd3aeb9ec5 (unknown)
# 0x408618 (unknown)
# (nil) (unknown)
Aborted (core dumped)
My NVIDIA driver is 352.41.
I installed 352 and it is installed latest version.
sudo apt-get install nvidia-352[sudo]
Reading package lists... Done
Building dependency tree
Reading state information... Done
nvidia-352 is already the newest version.
The following packages were automatically installed and are no longer required:
account-plugin-windows-live libupstart1
Use 'apt-get autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 31 not upgraded.
My Ubuntu has NVIDIA driver 352 and why I have error like
I0910 13:28:13.606891 10629 caffe.cpp:296] Use GPU with device ID 0
modprobe: ERROR: could not insert 'nvidia_352': No such device
F0910 13:28:13.728612 10629 common.cpp:142] Check failed: error == cudaSuccess (38 vs. 0) no CUDA-capable device is detected
I checked whether I have CUDA capable device like
lspci | grep -i nvidia
05:00.0 VGA compatible controller: NVIDIA Corporation GK107GL [Quadro K2000] (rev a1)
05:00.1 Audio device: NVIDIA Corporation GK107 HDMI Audio Controller (rev a1)
I have CUDA capable device and why I get the error?
EDIT 1:
Yeah my test with ./deviceQuery failed.
../NVIDIA_CUDA-7.5_Samples/bin/x86_64/linux/release/deviceQuery Starting...
CUDA Device Query (Runtime API) version (CUDART static linking)
cudaGetDeviceCount returned 38
-> no CUDA-capable device is detected
Result = FAIL
I checked in the dev/ folder, I have nvidia0.
crwxrwxrwx 1 root root 195, 0 Sep 10 16:51 nvidia0
crw-rw-rw- 1 root root 195, 255 Sep 10 16:51 nvidiactl
My nvcc -V check gave me
li#li-HP-Z420-Workstation:/dev$ nvcc -V
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2015 NVIDIA Corporation
Built on Tue_Aug_11_14:27:32_CDT_2015
Cuda compilation tools, release 7.5, V7.5.17
Then my version check
li#li-HP-Z420-Workstation:/dev$ cat /proc/driver/nvidia/version
NVRM version: NVIDIA UNIX x86_64 Kernel Module 352.41 Fri Aug 21 23:09:52 PDT 2015
GCC version: gcc version 4.8.4 (Ubuntu 4.8.4-2ubuntu1~14.04)
What could be wrong?
Now the problem is solved.
I checked sudo dpkg --list | grep nvidia
I found as my kernel has 352.41, but the client has 304.12.
So I did sudo apt-get remove --purge nvidia-*. It removed all packages.
Then, install 352.41 as
$ sudo add-apt-repository ppa:xorg-edgers/ppa -y
$ sudo apt-get update
$ sudo apt-get install nvidia-352
After that
$ sudo dpkg --list | grep nvidia
rc nvidia-304 304.128-0ubuntu0~gpu14.04.2 amd64 NVIDIA legacy binary driver - version 304.128
rc nvidia-304-updates 304.125-0ubuntu0.0.2 amd64 NVIDIA legacy binary driver - version 304.125
ii nvidia-352 352.41-0ubuntu0~gpu14.04.1 amd64 NVIDIA binary driver - version 352.41
rc nvidia-opencl-icd-304 304.128-0ubuntu0~gpu14.04.2 amd64 NVIDIA OpenCL ICD
rc nvidia-opencl-icd-304-updates 304.125-0ubuntu0.0.2 amd64 NVIDIA OpenCL ICD
ii nvidia-opencl-icd-352 352.41-0ubuntu0~gpu14.04.1 amd64 NVIDIA OpenCL ICD
ii nvidia-prime 0.6.2 amd64 Tools to enable NVIDIA's Prime
ii nvidia-settings 355.11-0ubuntu0~gpu14.04.1 amd64 Tool for configuring the NVIDIA graphics driver
Now version matches.
Then ./deviceQuery and all work as expected.
Thanks
I have this problem too. And re-installing the nvidia drivers didn't solve the issue.
Finally, I solved this problem by add two kernel parameters with grub.
add in:
GRUB_CMDLINE_LINUX_DEFAULT
with:
pci=nocrs pci=realloc
I think this is a collision between cuda7.5 and kernel3.19.
Another way I can do is install using .run file.
That needs to kill X server first.
X server is killed as follow.
Make sure you are logged out.
Hit CTRL+ALT+F1 and login using your credentials.
kill your current X server session by typing sudo service lightdm stop or sudo stop lightdm
Enter runlevel 3 (or 5) by typing sudo init 3 (or sudo init 5) and install your .run file.
You might be required to reboot when the installation finishes. If not, run sudo service start lightdm or sudo start lightdm to start your X server again.
Then run .run file as sudo sh xxxxx.run
You may get error as The distribution-provided pre-install script failed! Are you sure you want to continue?. Then abort the installation and
disable the "Nouveau kernel driver" as sudo update-initramfs -u
Then reboot the system and redo stop X server, enter runlevel 3 and do sudo sh xxxx.run again.
This time you can ignore the message and continue for that prescript fail message.
Then you will be able to install Nvidia Driver from .run file.
If you are showing video from non-nvidia device but have driver installed, you have to install it with “--no-opengl-files” flag, for Gnome to work.
I suggest to download a separate driver and install it manually by logging to console:
1. Alt Ctrl F2/f3/f4/f5 to get to console.
2. “init 3” to kill UI
3. relogin if necessary to console
4. wget http://us.download.nvidia.com/tesla/418.67/NVIDIA-Linux-
driver x86_64-418.67.run
5. sh NVIDIA-Linux-x86_64-418.67.run --no-opengl-files
6. After installation - reboot
I also had this problem. The above answers didn't work for me. When I installed latest driver(nvidia-364), it worked. Commands to run:
sudo add-apt-repository ppa:xorg-edgers/ppa
sudo apt-get update
sudo apt-get install nvidia-364
I think the problem occurs when we have different version of gcc used to compile driver modules and the Linux kernel.

Vagrant error "Failed to mount folders in Linux guest" after halt or reload

I'm trying to use a Vagrant box from someone else, and it works fine when I first start it, but after I stop it and restart it with either vagrant halt and vagrant up, or vagrant reload, I get the following error message:
Failed to mount folders in Linux guest. This is usually because
the "vboxsf" file system is not available. Please verify that
the guest additions are properly installed in the guest and
can work properly. The command attempted was:
mount -t vboxsf -o uid=`id -u vagrant`,gid=`getent group vagrant | cut -d: -f3` vagrant /vagrant
mount -t vboxsf -o uid=`id -u vagrant`,gid=`id -g vagrant` vagrant /vagrant
The error output from the last command was:
/sbin/mount.vboxsf: mounting failed with the error: No such device
Right now, searching for this error message turns up a lot of people having trouble with a bug Virtual Box 4.3.10, but that's not the problem I'm having.
It turns out, upgrading the Linux kernel will cause the Virtual Box Guest Additions to stop working until they are rebuilt by running the following command in the VM
sudo /etc/init.d/vboxadd setup
I had upgraded the kernel without thinking about it when I ran yum update (similar to apt-get upgrade) to get updates to other software.
Alternatively, if you install the dkms package as described here, then the kernel module should be automatically updated when the kernel is updated.
To fix this issue virtual box addition has to be installed. For example, I use Centos 7. Firstly download centos 7 minimal and then install guest addition, please see all steps below
Download centos 7
vagrant init centos/7
vagrant up
vagrant ssh
Install Guest addition for virtual box
yum update
reboot
vagrant ssh
yum update kernel
reboot
vagrant ssh
yum groupinstall "Development tools"
yum install kernel-devel
yum install wget
wget http://download.virtualbox.org/virtualbox/5.0.2/VBoxGuestAdditions_5.0.2.iso
sudo mkdir /media/VBoxGuestAdditions
sudo mount -o loop,ro VBoxGuestAdditions_5.0.2.iso /media/VBoxGuestAdditions
sudo sh /media/VBoxGuestAdditions/VBoxLinuxAdditions.run
rm VBoxGuestAdditions_5.0.2.iso
sudo umount /media/VBoxGuestAdditions
sudo rmdir /media/VBoxGuestAdditions
sudo /etc/init.d/vboxadd setup
sudo chkconfig --add vboxadd
sudo chkconfig vboxadd on
exit
Package new box
vagrant package --base my-virtual-machine
Hit the same issue, but with a different fix: I already had dkms installed (virtualbox-guest-dkms under Debian Jessie).
The thing was that the module «vboxsf» wasn't loaded automatically, and running mount shared_directory didn't work (No such file or directory error).
But after running modprobe vboxsf, the mounting was fine.
So I edited /etc/modules and appended vboxsf on a new line: problem solved!
Side note: if running modprobe vboxsf ends up on a error, you don't have the vboxsf module installed, so you should install DKMS module first.
Right after I got the same error I did this:
$ vagrant ssh
$ sudo apt-get update
$ exit
then installed vagrant-vbguest
$ vagrant plugin install vagrant-vbguest
then
$ vagrant halt
$ vagrant up
and it worked!
Looking at the logs it seems that vagrant-vbguest did some cleanup in terms of vbguest additions on the guest (the VM).
[default] GuestAdditions versions on your host (4.3.38) and guest (4.3.10) do not match.
* Stopping VirtualBox Additions
...done.
rmmod: ERROR: Module vboxsf is not currently loaded
rmmod: ERROR: Module vboxguest is not currently loaded
Reading package lists...
Building dependency tree...
Reading state information...
The following packages will be REMOVED:
virtualbox-guest-dkms* virtualbox-guest-utils* virtualbox-guest-x11*
0 upgraded, 0 newly installed, 3 to remove and 12 not upgraded.
After this operation, 12.1 MB disk space will be freed.
(Reading database ... 113238 files and directories currently installed.)
Removing virtualbox-guest-dkms (4.3.10-dfsg-1ubuntu5) ...
Error! Could not locate dkms.conf file.
File: does not exist.
Removing virtualbox-guest-x11 (4.3.10-dfsg-1ubuntu5) ...
Purging configuration files for virtualbox-guest-x11 (4.3.10-dfsg-1ubuntu5) ...
Removing virtualbox-guest-utils (4.3.10-dfsg-1ubuntu5) ...
Purging configuration files for virtualbox-guest-utils (4.3.10-dfsg-1ubuntu5) ...
Processing triggers for man-db (2.6.7.1-1ubuntu1) ...
Processing triggers for libc-bin (2.19-0ubuntu6.9) ...
Reading package lists...
Building dependency tree...
Reading state information...
dkms is already the newest version.
linux-headers-3.13.0-91-generic is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 12 not upgraded.
Copy iso file /Applications/VirtualBox.app/Contents/MacOS/VBoxGuestAdditions.iso into the box /tmp/VBoxGuestAdditions.iso
mount: block device /tmp/VBoxGuestAdditions.iso is write-protected, mounting read-only
Installing Virtualbox Guest Additions 4.3.38 - guest version is 4.3.10
Verifying archive integrity... All good.
Uncompressing VirtualBox 4.3.38 Guest Additions for Linux............
VirtualBox Guest Additions installer
Copying additional installer modules ...
Installing additional modules ...
Removing existing VirtualBox DKMS kernel modules ...done.
Removing existing VirtualBox non-DKMS kernel modules ...done.
Building the VirtualBox Guest Additions kernel modules ...done.
Doing non-kernel setup of the Guest Additions ...done.
Starting the VirtualBox Guest Additions ...done.
P.S. I'm on OS X using the following software versions:
$ vagrant plugin list
solve (0.8.2)
- Version Constraint: 0.8.2
vagrant-berkshelf (4.1.0)
vagrant-hostmanager (1.5.0)
- Version Constraint: 1.5.0
vagrant-hostsupdater (1.0.2)
vagrant-omnibus (1.3.1)
- Version Constraint: 1.3.1
vagrant-proxyconf (1.2.0)
- Version Constraint: 1.2.0
vagrant-share (1.1.5, system)
vagrant-vbguest (0.12.0)
$ VBoxManage --version
4.3.38r106717
$ vagrant --version
Vagrant 1.8.4
Hope this helps.
Just install the Vagrant plugin vagrant-vbguest, it can keep your VirtualBox Guest Additions up to date.
vagrant plugin install vagrant-vbguest
I have experienced the same error using Vagrant 1.8.1, VirtualBox 5.0.18, Chef 12.10.10 host MacOSX El Capitan and guest CentOS7.
I tried installing kernel-devel inside the guest, installing the latest GuestAdittions and updating yum, but none of these worked for me, so I changed the mount type for "nfs" in both my custom synced folders and chef temporary folder, and it worked!
In Vagrantfile, my synced folders:
config.vm.synced_folder ".", "/vagrant", type: "nfs"
and my chef_solo config:
chef.cookbooks_path = ["chef/cookbooks/"]
chef.synced_folder_type = "nfs"
VirtualBox 5.18 fixes this problem. It exists in 5.16 and can't be fixed by any usual means. The newest release 5.18 works perfectly.
The bellow issue on MAC is apparently caused by the vagrant plugin version vagrant-vbguest-3.0.
The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!
umount /mnt
Stdout from the command:
umount: /mnt: not mounted
Stderr from the command:
To resolve that reinstall the plugin with version 0.21
# uninstall
vagrant plugin uninstall vagrant-vbguest
# install with version 0.21
vagrant plugin install vagrant-vbguest --plugin-version 0.21

make: *** No targets specified and no makefile found. When trying to do dpkg-reconfigure virtualbox-dkms

I'm trying to get VirtualBox to work on ElementaryOS with kernel 3.2.0-49-generic. I've been getting this error :
WARNING: The character device /dev/vboxdrv does not exist.
Please install the virtualbox-ose-dkms package and the appropriate
headers, most likely linux-headers-generic.
You will not be able to start VMs until this problem is fixed.
No protocol specified
No protocol specified
Failed to open the X11 display!
I've searched and found that running :
sudo dpkg-reconfigure virtualbox-dkms
sudo dpkg-reconfigure virtualbox
Solves the problem.
But when i do sudo dpkg-reconfigure virtualbox-dkms. I get this error :
------------------------------
Deleting module version: 4.1.12
completely from the DKMS tree.
------------------------------
Done.
Loading new virtualbox-4.1.12 DKMS files...
Building only for 3.2.0-49-generic
Building initial module for 3.2.0-49-generic
ERROR (dkms apport): kernel package linux-headers-3.2.0-49-generic is not supported
Error! Bad return status for module build on kernel: 3.2.0-49-generic (x86_64)
Consult /var/lib/dkms/virtualbox/4.1.12/build/make.log for more information.
Now I've checked the make.log file i found this error :
DKMS make.log for virtualbox-4.1.12 for kernel 3.2.0-49-generic (x86_64)
Thu Jul 18 05:57:58 EET 2013
make: Entering directory `/lib/modules/3.2.0-49-generic/build'
make: *** No targets specified and no makefile found. Stop.
make: Leaving directory `/lib/modules/3.2.0-49-generic/build
I have no idea what should be done from here. Any help will be appreciated.
if you do ls -l in /lib/modules/3.2.0-49-generic/ folder you will find that build is a symbolic link to the /usr/src/3.2.0-49-generic directory
ex:
sagar.sakre#sagar-vm /lib/modules/3.2.0-23-generic $ ls -l
total 4412
lrwxrwxrwx 1 root root 39 Aug 6 2012 build -> /usr/src/linux-headers-3.2.0-23-generic
So make sure that you have the built source code in /usr/src/ directory. If still problem persists upgrade the kernel.
I had the same problem installing the virtualbox via apt-get. So I have solved downloading the oracle version of virtual box. Try it:
Remove the virtualbox
sudo apt-get purge virtualbox
Download the virtual box on the oracle website
https://www.virtualbox.org/wiki/Linux_Downloads
Then install
sudo dpkg -i virtualbox-version...
I hope it works fine for you
If someone has same prob on Debian.
If ls -lah show this
toor#tr:/ ls -lah /lib/modules/3.2.0-4-486/
drwxr-xr-x 4 root root 4.0K Sep 22 2015 build
maybe you have same prob as me
this fixes my probleem
toor#tr:/ sudo mv /lib/modules/3.2.0-4-486/build /lib/modules/3.2.0-4-486/build.bak
toor#tr:/ sudo ln -s /usr/src/linux-headers-3.2.0-4-486 /lib/modules/3.2.0-4-486/build
toor#tr:/ ls -lah /lib/modules/3.2.0-4-486/
lrwxrwxrwx 1 root root 34 Jul 24 22:04 build -> /usr/src/linux-headers-3.2.0-4-486
after
toor#tr:/lib/modules/3.2.0-4-486$ sudo /usr/lib/virtualbox/vboxdrv.sh setup
Stopping VirtualBox kernel modules ...done.
Uninstalling old VirtualBox DKMS kernel modules ...done.
Trying to register the VirtualBox kernel modules using DKMS ...done.
Starting VirtualBox kernel modules ...done.
And it works.
Thanks to this man Sagar Sakre

Resources