A definitive and stable way to install CUDA on (Ubuntu 14.04, Mint 17.2, or Fedora) [closed] - linux

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 8 years ago.
Improve this question
I am having trouble with CUDA installation on Linux.
I have tried the installation of CUDA 6 on:
Ubuntu 14.04 (x64)
Linux Mint 17 (x64)
The problem:
I have tried to simply download/execute the nvidia CUDA executable (it is a *.run file downloaded from nvidia website)
I have tried to install CUDA from the .deb file given by nvidia
I have tried to install CUDA from edgers repository
I have followed tens of tutorials, I have reinstalled at least 20 times Linux, just to be sure that I am working on a clean version.
In any case: I paid attention to define the variable environment at the end of the process: PATH and LD_LIBRARY_PATH so that they point to the recently installed CUDA directory. (/path/to/cuda/bin for PATH and /path/to/cuda/lib64 for LD_LIBRARY_PATH.
At the end of the process I am trying to compile and launch the sample code given by nVidia in the sample code thing that you can install/download.
The example I am running is "deviceQuery". (located in /path/to/cuda/samples/)
In any case, I had the nvidia (proprietary driver installation), not Nouveau.
And in any case, I have an error when I launch this deviceQuery. The error is either something like: no CUDA-able device detected.
Or something like nvidia-uvm is missing (I have tried to install nvidia-uvm, when I tried the installation from the edgers PPA repository, and the error I have when I launch the deviceQuery sample is then no no CUDA-able device detected.
The question
What is, the right, stable, clear way to install CUDA on ANY version of Linux.
I am ready to download, install ANY version of Linux.
Thanks a lot and very much for your help

Niether Ubuntu 14.04 nor Linux Mint 17 is an officially supported distro for CUDA 6.
I've just done two installs of CUDA 6.5RC on Fedora 20 64-bit.
load Fedora 20, select the C Development personality
download the CUDA 6.5RC 64-bit installer (.run file) from developer.nvidia.com (you have to be a registered developer)
switch to runlevel 3. To do this, take a look at the instructions in /etc/inittab, you basically want to do this, as root:
ln -sf /lib/systemd/system/multi-user.target /etc/systemd/system/default.target
remove the nouveau driver (as root):
echo -e "blacklist nouveau\noptions nouveau modeset=0" > /etc/modprobe.d/disable-nouveau.conf
dracut --force
reboot, and run the CUDA installer (.run file) as root. If you have 4GB or less of system memory, you may want to specify the temp directory that doesn't use tmpfs:
sh cuda_6.5.11_rc_linux_64.run -tmpdir /var/tmp
select accept, y, or <enter> as appropriate to accept the default options for loading the driver, toolkit, and samples.
you can now switch back to runlevel 5 if you want to.
run nvidia-smi as root, each time you reboot the system. This should not be necessary if you are running X (ie. runlevel 5). And there are other ways to address this as discussed in the getting started document.
Also refer to the linux getting started guide.
Instructions for other RHEL/CentOS/Fedora distros will be similar, and should work with previous CUDA versions (e.g. 6), if you don't want to use the 6.5RC toolkit. Be sure to select a distro that is officially supported for the CUDA toolkit you choose (in recent toolkits, refer to the getting started document.)
You'll also want to do those things you already know about, such as building the samples, setting your PATH and LD_LIBRARY_PATH environment variables, etc. This brief answer is not intended to be a replacement for reading the getting started document.

Related

Any success installing VMware Workstation on virgin Rocky Linux 8.5?

Using a virgin (but updated) version of Rocky Linux 8.5, I am trying to install VMware Workstation 16.2.1 (and others), but get compile errors during the first attempt to run, when vmmon and vmnet are being built.
All the proper, current headers from kernel-devel and kernel-headers are installed.
I tried upgrading to the 5.16.4 kernal at kernel.org, with all associated headers, and basically get the same errors.
"Unable to install all modules." i.e., vmmon and vmnet
Posts i have found with searching the net seem to indicate that there was a "back-port" of an upstream fix to Rocky that has affected the ability to build the loadable kernel modules necessary to run vmware - but i cannot confirm this is actually the problem that I am experiencing.
So i simply ask these questions: Can anyone (today) install VMware Workstation 16.2.1 (or any version), on a fresh install of Rocky Linux 8.5?
If so, would you please point me at your installation instructions, because I am unable to build "vmmon" and "vmnet" modules today (2022-01-04), that allow me to actually run virtual machines with vmware? (The kernel modules fail to compile and build.)
(and after 15 years of using stackoverflow i do not have the reputation to create a "rocky-linux" question tag...)
See https://unix.stackexchange.com/questions/689436/the-vmmon-and-vmnet-vmware-workstation-kernel-modules-fail-to-build-on-rocky-lin
mbubecek's instructions work for a variety of releases and should compile perfectly and run without issue, if you follow his instructions.
I have successfully used these methods at least a half dozen times with Rocky 8.5 and 8.6 with vmware workstation 16.1 up to version 16.2.1
NOTE: This error is NOT Rocky Linux specific. Also happens on some versions of RHEL 8 and CentOS 8.x I would also expect this "fix" to work on all of the other linux versions that are RHEL 8-derived.
I've been having difficulty with the same issue, and a colleague pointed me to check my kernel. This is our "official" resolution. See if the below works for you.
This is due to differences between the kernel and the source code for the VMWare modules, see here for more information. You can get the correct kernel modules, and build them by executing the following commands
wget https://github.com/mkubecek/vmware-host-modules/archive/workstation-16.1.0.tar.gz
tar -xf workstation-16.1.0.tar.gz
cd vmware-host-modules-workstation-16.1.0/
make
sudo make install
If you get the error,
crosspage.c:53:16: fatal error: linux/frame.h: No such file or directory
The error is described here. The solution is to remove (i.e. comment out) the offending include file in crosspage.c After doing the sudo make install, it is a very good idea to restart you host.
You may need to manually insert the modules into the kernel the first time after running make install'. The kernel modules (vmmon.ko and vmnet.ko) will be found at /lib/modules//misc. The following set of command will do this:
cd /lib/modules/$(uname -r)/misc
sudo insmod vmmon.ko
sudo insmod vmnet.ko
The modules should be load automatically after a restart/reboot.
If you update vmware to a different version (say 16.2.1) you may need to this again. Just change the versions in the above commands. If you hit the update button on the splash-screen and failed to notice the version you are updating to, you can run `vmware -v' at a command prompt to get the version you updated to.

Why is node -v command not working with wsl2 Ubuntu 20.04 on windows [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 1 year ago.
Improve this question
I installed Ubuntu 20.04 on my windows 11 system but i can't run the "node -v" command like i used to with my powershell cmd.
It is saying command node not found, but I can run the same command on cmd and have the node version installed on my system display.
Please any solution
Some of the comments mention this briefly, but I think it warrants a more detailed explanation, with some additional information to help you on your WSL journey.
First, WSL does allow you to run Windows executables, but it requires the full executable name -- For instance, node.exe, assuming it is in your path. Otherwise, it would need /mnt/c/path/to/node.exe.
WSL also appends the Windows path to the Windows path, and translates it to the Linux form, so you'll automatically find things like:
/mnt/c/Windows
/mnt/c/Windows/System32
/mnt/c/Windows/System32/WindowsPowerShell/v1.0
...and others in when you echo $PATH under WSL/Linux. This means you can run PowerShell from within WSL/Linux as powershell.exe, and can even execute scripts and commands like powershell.exe -c "Get-Help" | less. Hey, finally - A decent pager under PowerShell! ;-)
That said, even if you can run the Windows node.exe under WSL, it's a bad idea to do so. The Windows version of Node understands Windows drives, Windows paths, and Windows network interfaces. When you are running in WSL, the shell will pass in the Linux path to a Windows command.
You can work around this with the wslpath command (installed by default in some WSL distributions), but really, as the comments pointed out, if you are running in WSL/Linux, you should install the Linux version of Node.
I recommend picking one or the other until you understand the differences, and unless you have a need for the Windows version, I'd recommend the Linux route.
This also means that you should keep your project files in WSL, probably in a directory under your Linux $HOME directory (i.e. /mnt/username). With WSL2, at least, this has two advantages:
Much faster performance (Visual Studio Code will even warn you of the performance penalty if you try to keep them on a Windows drive)
inotify support for projects where you enabled automatic watching/reload. This will not work with files on the Windows drive when working under WSL, but will work on the default WSL filesystem.

How to avoid GRUB errors after running apt-get upgrade - Ubuntu [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 6 years ago.
Improve this question
I'm running ubuntu 14.04 on an EC2
After running apt-get upgrade
I'm prompted with a screen that asks me to reinstall GRUB boot loader
The GRUB boot loader was previously installed to a disk that is no longer present, or whose unique identifier has changed for some reason. It is important to make sure that the installed GRUB core image stays in sync with GRUB modules and grub.cfg. Please check again to make sure that GRUB is written to the appropriate boot devices.
How do I know which device should I select?
What if I have mounted on my machine some additional EBS, should I select them as well?
Can I avoid this prompt, during the upgrade or supply some defaults to the command?
The following prompt is
A new version of /boot/grub/menu.lst is available, but the version installed currently has been locally modified.
install the package maintainer's version
keep the local version currently installed
show the differences between the versions
show a side-by-side difference between the versions
show a 3-way difference between available versions
do a 3-way merge between available versions (experimental)
start a new shell to examine the situation
The same q's here:
How do I know which one should I select?
Can I avoid this prompt, during the upgrade or supply some defaults to the command?
I had similar problem.
1) If you take a look man apt-get, you will find a configuration option-o.
It allows to set options for Debian package manager dpkg.
2) In the manual man dpkg you can find set of options --force-confdef(force to keep default option without prompting) and --force-confold (force to keep old conf files)
In some sources I found, that people pass env variable DEBIAN_FRONTEND=noninteractive as well, but I could not find it in any manual.
So, the final command in .sh script, that I use to run upgrade:
sudo DEBIAN_FRONTEND=noninteractive apt-get -y -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" upgrade

How to upgrade jre selectively on linux mint [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
I have newly started using linux mint (linux at all).
I have installed two jre versions on it. One openjdk and another oracle jdk. Here is how my update-alternatives --config java output says -
There are 2 choices for the alternative java (providing /usr/bin/java).
Selection Path Priority Status
------------------------------------------------------------
0 /usr/lib/jvm/java-7-openjdk-amd64/jre/bin/java 1071 auto mode
1 /usr/lib/jvm/java-7-openjdk-amd64/jre/bin/java 1071 manual mode
* 2 /usr/lib/jvm/jre1.7.0_13/bin/java 2 manual mode
I want to upgrade oracle jre listed at #2 above. Is there a way to selectively upgrade that?
Here is what I tried:
1. I tried finding this jre in package manager but I couldn't find it, may be because I manually installed it.
2. Did 'apt-get update' and tried to find oracle java in 'apt-cache search' so that I can upgrade from there, but again couldn't find oracle java in search.
The final approach that I am thinking of trying is to download latest version and install it along with 1.7.0_13 and making that choice. However, I want a way to upgrade existing.
Any inputs?
Ubuntu and other Linux distributions usually provide a custom linux version (such as openJDK). To install the official versions, I recommend you to use this site: http://www.devsniper.com/ubuntu-12-04-install-sun-jdk-6-7/, from where I took the steps to install it in my machine.
There is also this option, that talks specifically about Linux Mint and is simmilar : http://www.vivaolinux.com.br/dica/Instalando-Java-no-Linux-Mint-Ubuntu-e-derivados

Upgrading a package whose newest version is not still in the distribution repository [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 9 years ago.
Improve this question
I need to upgrade libpng from version 1.2 to 1.5. I need to do so because of this: libpng warning: Application built with libpng-1.2.26 but running with 1.5.2. I am using Lubuntu 11.10 and in the Canonical repositories libnpg 1.5 is not still released although at Debian ones there are testing packages (http://packages.debian.org/search?keywords=libpng) that at first they would fit to me. I added the Debian repositories to Synaptec and I was able to install libpng15, but those packages do not replace libpng12, son when it comes to compile some source code the IDE uses libpng12 instead of libpng15.
To try to solve this I downloaded the libpng15 deb package, uncompressed it and changed the Replaces, Conflicts and Provides tags of the control file with the libpng15 text. Then, I executed the modified deb, but what I only got was a GDebi error and a general system failure because (I think) libpng12 was uninstalled with no replacement and Lubuntu heavily depends on it, which forced me to reinstall Lubuntu because the computer did not boot again in Linux. Yes, this solution is not the neatest way I think.
So, is there any way to upgrade a package and replace the old version whose newer version exists but it is not still in the distribution repository? I found ubuntu repository for libpng and How to upgrade a package in linux that was built from source?. Although not very determinant so far.
I have not found out how to upgrade and replace a package whose newer version is not still in the distribution repository. But I have realized that if some library X relies on a given version of other library Y, there is no way to change the version of that dependence unless you make some change onto the source code of X, that is it, the library X is recompiled to point to the desired version (usually with the help of some configuration tag). Even though some trick could be done as by modifying the symlink of the library Y to point to the newer version. Then, the compiler will complain and ask for the old version.
Maybe this looks obvious now. But if the software that has to be recompiled requires many hours, has unresolved dependences or gives built errors you will try to avoid the compilation no matter if you are violating thermodynamics laws.
So in my case I had to recompile Qt and by using the -system-libpng configuration tag Qt understood it had to use system libpng libraries, not in-built ones. And after 8 hours of compiling I got a successfully built which solved this libpng problem.
Thanks everyone for the comments and suggests.
For all of the trouble you're going through, it might be easier to simply compile from source, and install to /usr/local (instead of /usr, as debs do). I've done this for several library dependencies for programs I've compiled (with make build systems) without any trouble. However, it sounds like the program(s) you're compiling are having trouble choosing the right version of the package. In my opinion, that is the real issue. Having multiple versions of a library installed simultaneously is supported, but perhaps not by apt in the case of mixing Debian and Ubuntu repos.
When you compile your program, use gcc -lpng15 instead of -lpng. According to the gcc info manual, an option of -lname causes the linker to look for libname.a in the lib folders. On my system (Ubuntu 10.04), libpng.a is a symlink to libpng12.a. This is why your program is choosing the wrong lib.
Try adding this ppa: https://launchpad.net/~linaro-maintainers/+archive/overlay. It contains libpng1.5 for Oneiric.
You can install it by running
sudo add-apt-repository ppa:linaro-maintainers/overlay
sudo apt-get update
sudo apt-get install libpng1.5
To properly link against libpng15, you will also need to install libpng15-dev.

Resources