Posts Tagged ‘ubuntu’

How to check if a package is installed in Ubuntu

January 18, 2012 Leave a comment

If you want to know if a package is installed in Ubuntu you can use dpkg command. There are several ways to achieve this.

For instance, if you want to know if sudo package is installed:

$ dpkg -s sudo

Package: sudo
Status: install ok installed
Priority: optional
Section: admin
Installed-Size: 804
Maintainer: Ubuntu Developers <>
Architecture: amd64
Version: 1.7.4p6-1ubuntu2
Replaces: sudo-ldap
Depends: libc6 (>= 2.11), libpam0g (>=, libpam-modules
Conflicts: sudo-ldap
 /etc/pam.d/sudo 402488da83015090763d681fffae6340
 /etc/sudoers.d/README 0b76d590c3d5d1966bdfa7ee808893c4
 /etc/sudoers bb3dd9531a53d7dc6fe26d2e019d7456
 /etc/init.d/sudo 8dd3c1c4fb7582466676fd00d31cdc9b
Description: Provide limited super user privileges to specific users
 Sudo is a program designed to allow a sysadmin to give limited root
 privileges to users and log root activity. The basic philosophy is to give
 as few privileges as possible but still allow people to get their work done.
 This version is built with minimal shared library dependencies, use the
 sudo-ldap package instead if you need LDAP support for sudoers.
Original-Maintainer: Bdale Garbee <>

If you don’t know the name of the package, you can try this:

$ dpkg --get-selections | grep sudo
gnome-sudoku                 install
sudo                install

Categories: linux, ubuntu Tags: , , ,

VirtualBox Error: “ahci-0-0″ (rc=VERR_DISK_FULL)”

January 10, 2012 3 comments

I’ve installed Windows 7 on VirtualBox (Ubuntu host) and when I start the machine I get this error:

Disk full

The error message is this:

An error has occurred during virtual machine execution! The error details are shown below. You may try to correct the error and resume the virtual machine execution.

The I/O cache encountered an error while updating data in medium "ahci-0-0" (rc=VERR_DISK_FULL). Make sure there is enough free space on the disk and that the disk is working properly. Operation can be resumed afterwards.

Severity:   Non-Fatal Error

I thought it was the VirtualBox’s vdi hard disk drive that was full, but it was much easier. Just a “df -h” and I realized that my host disk was full!

Categories: virtual box Tags: ,

MySQL: Error 1045 (28000): Access denied for user ‘root’@’localhost’ (using password: NO)

November 21, 2011 36 comments

I’ve upgraded MySQL server version to 5.1.54-1ubuntu4 and when I try to connect to the database I’m getting this error:

$ mysql -u root

Error 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)

Maybe updating the package the updater overwrote the root password.

To restore it:

  • Stop mysqld deamons.
$ sudo service mysql stop
  • Go  to  mysql/bin directory
$ cd /usr/bin
  • Start a mysql deamon with this option:
$ sudo mysqld_safe --skip-grant-tables
  • Open another terminal and open a mysql session to execute this:
$ mysql
mysql> use mysql;
mysql> UPDATE user SET password=PASSWORD('YOUR_NEW_PASSWORD_HERE') WHERE user = 'root';
mysql> exit;
  • Now kill the mysqld_safe process and restart mysqld normally:
$ sudo service mysql start
Categories: MySQL, ubuntu Tags: , , , ,

Spotify on Ubuntu: “There is a problem with your sound card. Spotify can’t play music”

October 25, 2011 Leave a comment

If you get this error:

There is a problem with your sound card. Spotify can’t play music

Follow this steps:

  1. Close Spotify
  2. In a terminal, type winecfg
  3. Go to the Audio tab
  4. Click “Test Audio” and if you hear a sound go to the next step. If not… you have another problem.
  5. Make sure only OSS Driver is checked in the driver list.
  6. In DirectSound, make sure Hardware Acceleration is Emulation and Default Sample Rate is 44100 and Default Bits Per Sample is 16.
  7. Restart Spotify, you maybe view the mesasge, but if you try to play a song, it dissapears.

Install Apache on Ubuntu

August 31, 2011 1 comment

First of all, install the required packages

sudo apt-get install apache2

Installing Apache on Ubuntu is that simple. You can test it works in your browser:


But if you want more sophisticated things, you’ll have to deal with the apache modules.

Categories: apache, ubuntu Tags: , ,

Install oracle database 10g on ubuntu 10.10 64 bits

May 24, 2011 2 comments

Some time ago, I installed Oracle 10g on my Ubuntu box. The client worked perfect, as I was able to connect to other databases in remote machines. But I can’t create a local database, getting diferent errors.

These past days I’ve tried to reinstall on Ubuntu 10.10 64 bits and I found this post, and all it’s working.

I’ve installed the Patchset and I’ve created a local database, all perfect.

Categories: oracle, tutorial, ubuntu Tags: , ,

Change your DNS to OpenDNS in ubuntu

April 30, 2011 2 comments

If you want a fast and reliable DNS server, try OpenDNS.

Just edit /etc/resolv.conf

$ sudo vi /etc/resolv.conf

And modify the values to the ones of the OpenDNS:


And that’s all, you don’t need to restart, simply save the changes.

Categories: communications, linux, ubuntu Tags: , ,