cuda toolkit 5.0 installer does not create nvcc bin [duplicate] - cuda

I successfully installed the nvidia driver and toolkit for cuda 5 (but not the samples) on a 64 bit Ubuntu 12.04 box. The samples failed to install even though I previously ran
$ sudo apt-get install freeglut3-dev build-essential libx11-dev libxmu-dev libxi-dev libgl1-mesa-glx libglu1-mesa libglu1-mesa-dev
I can't seem to find nvcc. I ran
$ export LD_LIBRARY_PATH=/usr/local/cuda-5.0/lib:/usr/local/cuda-5.0/lib64:$LD_LIBRARY_PATH
nvcc -v reports that the compiler is not found:
nvcc -V No command 'nvcc' found, did you mean: Command 'nvlc' from
package 'vlc-nox' (universe) nvcc: command not found
The getting started guide hasn't been of much help here:
http://docs.nvidia.com/cuda/cuda-getting-started-guide-for-linux/index.html
What's going on here? Do I need to install the gpu computing sdk samples to get nvcc? :/

Consider installing CUDA 5.5 in Ubuntu 12.04. The 5.5 release has special leverages to install it as a debian package. See the following links,
https://developer.nvidia.com/content/cudacasts-episode-5-install-cuda-55-linux-package-manager
https://developer.nvidia.com/cuda-downloads
It is truly much easier than all that you have tried till now ! personal experience ! :-)

Failing to install samples is a common problem as outlines in https://sn0v.wordpress.com/2012/12/07/installing-cuda-5-on-ubuntu-12-04/#comment-869
The solution is to find "libglut.so" and create a soft-link to it under /usr/lib. Then re-run the cuda*.run and choose to install only the samples.
sudo find /usr -name libglut\*
sudo ln -s /usr/lib/x86_64-linux-gnu/libglut.so.3 /usr/lib/libglut.so
sudo ./cuda*.run #when prompted only install samples. ie do not install drivers and toolkit.
works for me on ubuntu 12.04 hope it works for you too

I met the problem during the installation, but I found the sudo ln -s /usr/lib/x86_64-linux-gnu/libglut.so.3 /usr/lib/libglut.so is useless. My solution is to install freeglut3 first:
`sudo apt-get install freeglut3`
then use:
sudo ln -s /usr/lib/libglut.so.3 /usr/lib/libglut.so
After this, CUDA sample is successfully installed.

Related

CUDA 7.5 installation: Unsupported compiler error

I just tried installing CUDA 7.5 on my laptop. I disabled lightdm and did sudo sh cuda7.5.run. The driver installation passed but then I got an error Unsupported compiler ... and the installation fails. How can I resolve this issue?
I had a similar issue installing CUDA 7.5 in Ubuntu 16.04.
I've solved it using gcc/g++ 4.8 instead of 5.2.
You can install it and switch the default version using the command update-alternatives --install
For gcc 4.8 do:
sudo apt-get install gcc-4.8
sudo update-alternatives --remove-all gcc
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.8 10
For g++ 4.8 do:
sudo apt-get install g++-4.8
sudo update-alternatives --remove-all g++
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.8 10
The problem was with Ubuntu 15.10. I installed 14.04 and could install CUDA. However, for my laptop there was a subtle point to mention. I had to install the NVIDIA driver via System Settings --> Software & Updates --> Additional Drivers and selecting the tested driver. Then I installed CUDA and answered No to driver installation bundled with CUDA installation file.
You do not need to downgrade your gcc version.
For the people who want to keep their gcc version, I recommend you use the following way.
http://kislayabhi.github.io/Installing_CUDA_with_Ubuntu/
sudo apt-get update unity should also help

Installing CUDA 5.0 RC samples

I tried to install the full CUDA 5.0 package but I got the following error:
Driver: Not Selected
Toolkit: Not Selected
Samples: Installation Failed. Missing required libraries.
So, in the /tmp/cuda_install_2340.log I've got:
Missing required library libglut.so
But I have installed it before, because I do:
facundo#gpgpu:~$ locate libglut
/usr/lib/x86_64-linux-gnu/libglut.a
/usr/lib/x86_64-linux-gnu/libglut.so
/usr/lib/x86_64-linux-gnu/libglut.so.3
/usr/lib/x86_64-linux-gnu/libglut.so.3.9.0
So, What is the problem? I am on Ubuntu 12.04
I'm on Ubuntu 12.04, I fixed it by the following:
sudo ln -s /usr/lib/x86_64-linux-gnu/libglut.so /usr/lib/libglut.so
So the problem was ubuntu are installing libglut library in a different path for x64 architectures, so it can be fixed making a symbolic link to /usr/lib/.
On CentOS 5.6 x64 , Kernel: 2.6.18-308.24.1.el5
1. yum install freeglut
2. ln -s /usr/lib/libglut.so.3 /usr/lib/libglut.so
then i also install CUDA 5.0 Sample successfully.
Thanks this post.
Ubuntu 12.04 x64 actually creates a /usr/lib/glut.so -- it just points to libglut.so.3 not /usr/lib/x86_64-linux-gnu/libglut.so
rm /usr/lib/libglut.so;
ln -s /usr/lib/x86_64-linux-gnu/libglut.so /usr/lib/libglut.so

Problem with compiling n-body simulation with CUDA

I have a linux ubuntu 10.04 LTS freshly installed on my x64 PC, and I just followed this step-by-step installation guide to install NVidia CUDA on my PC. But when I cd into ~/NVIDIA_GPU_Computing_SDK/C/src/nbody and try to make the nbody simulation, it just prints out:
/usr/bin/ld: cannot find -lGL
collect2: ld returned 1 exit status
make: *** [../../bin/linux/release/nbody] Error 1
Is this a solvable problem?
I'm a newbie in Linux (and in Cuda programming) so please help me understanding.
cd /usr/lib/
ls -la | grep libGL.so
if libGL.so exists
sudo rm libGL.so
then run
sudo ln -s libGL.so.270.41.19 libGL.so
or whatever version of libGL.so you have
Use the Synaptic Package Manager and install the packages with libgl, libglu, libglut, etc. For example, libgl1-mesa and all its dev variants, freeglut, etc.
sudo apt-get install build-essential x-window-system-dev
will also get you the vast majority of those.

cannot find -lmysqlclient

I'm trying to compile a C++ program and one of the classes uses . g++ is not able to find the libraries would be my guess. The command i use to compile is -
g++ c1.cpp c2.cpp c3.cpp c4.cpp -o c4 -lm -lmysqlclient
c3.cpp is the file that needs mysql.h. This works perfectly on my local machine, but refuses to run on the server with the error
cannot find -lmysqlclient
I tried finding the libmysqlclient.so files on the server using the find command, I don't think they are present there
uname -a
reveals
SunOS opteron 5.10 Generic_139556-08 i86pc i386 i86pc
user#opteron 12:26:02 ~/c++/projname/
I realize that i need to link some libraries, but where and how?
Any help would be appreciated.
Thanks.
Whatever library packages u think is not installed can be installed using sudo apt-get install. But the problem is to find the right name of the package apt-get can understand. So how to do that ?! simple
use command : sudo apt-cache search <filename>
For eg.: in this case lmysqlclient
sudo apt-cache search mysqlclient
(remember to exclude 'l' from the actual name ,ie, mysqlclient and not lmysqlclient).
This outputs:
libmysqlclient-dev - MySQL database development files
In the above -libmysqlclient-dev is the name that apt-get can recognize and solve our cannot find lmysqlclient problem
so now type: sudo apt-get install libmysqlclient-dev from interface.
After its done, try making your required file.
Simplifying #SriHariY.S's answer-
Try installing it with sudo apt-get install libmysqlclient-dev.
Do you have the MySQL client libraries? Can you look for it as
find / -name "libmysqlclient.so" -type f -print 2>/dev/null
Also, you can use the -R flag on linker to hardlink the libmysqlclient as
g++ -R/usr/local/mysql/lib ....
Or, you can export the LD_LIBRARY_PATH_32 or LD_LIBRARY_PATH_64 as
export LD_LIBRARY_PATH_32=$MYSQL_HOME/lib
Urko,
On Ubuntu 18 I used this command to find a name of required package for fixing this error:
apt search lmysqlclient
After this I installed missing package:
sudo apt install libmariadbclient-dev-compat

Is there no mysql connector for python 2.7 on windows

While I see a bunch of links/binaries for mysql connector for python 2.6, I don't see one for 2.7
To use django, should I just revert to 2.6 or is there a way out ?
I'm using windows 7 64bit
django - 1.1
Mysql 5.1.50
Any pointers would be great.
For Python 2.7 on specific programs:
sudo chown -R $USER /Library/Python/2.7
brew install mysql#5.7
brew install mysql-connector-c
brew link --overwrite mysql#5.7
echo 'export PATH="/usr/local/opt/mysql#5.7/bin:$PATH"' >> ~/.bash_profile
sed -i -e 's/libs="$libs -l "/libs="$libs -lmysqlclient -lssl -lcrypto"/g' /usr/local/bin/mysql_config
pip install MySql-python
This solved all issues I was having running a program that ran on Python 2.7 on and older version of MySql
Try this one. This guy has done a good job and figured out the localization problem and gives a good link to windows binaries for what are you looking for. I hope it helps someday) Good luck!
this installer worked for me :
http://www.codegood.com/archives/129