Here is the solution for ImportError: No module named MySQLdb install python-mysqldb using the following command (ubuntu ) apt-get install python-mysqldb in Fedora use yum install instead of apt-get install.
Category Archives: ubuntu
[Linux][Python]How to assign os.system output to a python variable
#This python script is to get system’s VGA monitor info import commands command = “lspci | grep VGA ” status, vgaInfo = commands.getstatusoutput(command) print “VGA info=%s” % ( vgaInfo ) which will give the output VGA info=00:02.0 VGA compatible controller: Intel Corporation Core Processor Integrated Graphics Controller (rev 18) in my system
Ubuntu mysql error : Access denied for user root@localhost
First remove all mysql related packages sudo apt-get purge mysql-server mysql-client mysql-common mysql-server-5.5 sudo apt-get autoremove sudo apt-get autoclean Remove mysql directories rm /etc/mysql/ -R rm /var/lib/mysql/ -R Now install mysql-server sudo apt-get install mysql-server Note the root password you created . Now use the following to enter into mysql terminal mysql -u root -p
[Ubuntu]How to change screen resolution in ubuntu using terminal
install xrandr run xrandr and find out the display connected . In my system , xrandr output shows LVDS1 connected ————————————————-Output of xrandr command———————————————————————— Screen 0: minimum 320 x 200, current 1366 x 768, maximum 32767 x 32767 LVDS1 connected primary 1366×768+0+0 (normal left inverted right x axis y axis) 309mm x 174mm 1366×768 60.0*+ContinueContinue reading “[Ubuntu]How to change screen resolution in ubuntu using terminal”
[Ubuntu]About apt-cache search
if we are planning to install a package , first we can search in the apt-cache using apt-cache search eg: apt-cache search xrandr will give the result as follows arandr – Simple visual front end for XRandR libxrandr-dev – X11 RandR extension library (development headers) libxrandr2 – X11 RandR extension library libxrandr2-dbg – X11 RandRContinueContinue reading “[Ubuntu]About apt-cache search”
[Ubuntu][Xorg][Libdrm]Error: XORG_DRIVER_CHECK_EXT(RANDR, randrproto)
I fixed this error by executing following command (Ubuntu) apt-get install xorg-dev Later point of time if u get an error like libdrm module not found, then do the following apt-get install libdrm-dev
[Ubuntu]GPG_error : The following signatures couldn’t be verified because the public key is not available: NO_PUBKEY
if you have faced the error “GPG_error : The following signatures couldn’t be verified because the public key is not available: NO_PUBKEY” , then please try the below command sudo apt-key adv –keyserver keyserver.ubuntu.com –recv-keys XXXXXXXXX Where XXXXXX is the number displayed after NO_PUBKEY error
[Linux]add-apt-repository: command not found
if you are getting the error “add-apt-repository: command not found”, then execute below command in ubuntu (use yum instead of apt-get in Fedora) sudo apt-get install software-properties-common python-software-properties
[Python]ImportError: No module named PIL
Install python-imaging sudo apt-get install python-imaging -y use yum install in fedora
[Linux][Shell] What to do if locate command (linux shell command) is not listing the files, even though files are present
If locate command is not listing the files, even though files are present then Install mlocate using apt-get or yum then execute updatedb command ———– apt-get install -y mlocate updatedb