Saturday, 20 August 2011

Ubuntu - Tricks

Hi
  1. E: Could not get lock /var/lib/dpkg/lock - open (11: Resource temporarily unavailable)
    • sudo -i
    • ps -e | grep -e apt -e adept | grep -v grep
      • sudo kill (number process)
        • sudo kill 11158
        • sudo kill 11234
    • sudo rm /var/lib/dpkg/lock
    • dpkg --configure -a
  2. Remove Apps
    • Using aptitude:
      • sudo aptitude
      • Press "/" for search app want to remove:
      • Choose it and press "-"
      • Press "g" and Enter for remove process:
    • Using command line:
      • sudo aptitude remove your-app-name
      • sudo apt-get --purge remove your-app-name
      • sudo dpkg --remove --force-remove-reinstreq your-app-name
      • sudo dpkg -r full-path-your-app-deb-file

  3. ./shell.sh: 11: [: unexpected operator
    • Change #!/bin/sh to #!/bin/bash in shell file
  4. Could not get lock /var/lib/dpkg/lock - open (11: Resource temporarily unavailable)
    • ps -e | grep -e apt -e adept | grep -v grep
    • sudo kill (number process)

Good luck!

No comments:

Post a Comment