1

I am a new Ubuntu user. I'm having a problem when trying to install GParted with these commands:

su root
apt-get install gparted

Soon after running the commands, this error appears below, and I do not know what it is or how I can fix it. Thanks in advance.

E: dpkg was interrupted, you must manually run 'sudo dpkg --configure -a' to correct the problem."
karel
  • 122,292
  • 133
  • 301
  • 332

3 Answers3

1

Running a root shell is not suggested or supported by the designers of Ubuntu. sudo allows authorized users (normally "Administrative" users) to run certain programs as Root without having to know the root password. This means that in the terminal you should use sudo for commands that require root privileges; simply prepend sudo to all the commands you would normally run as Root.RootSudo

In Ubuntu the root account is not active by default, so the command su root would not work unless you had previously changed the password for the root account, which is not recommended.

To install GParted open the terminal and type:

sudo dpkg --configure -a  # fix the error message
sudo apt-get install gparted  # install gparted

RootSudo: página em Português

karel
  • 122,292
  • 133
  • 301
  • 332
1

Try the below commands on terminal to remove all the files inside /var/lib/dpkg/updates directory ,

cd /var/lib/dpkg/updates

sudo rm *

And then run the below command to get newer ones,

sudo apt-get update

Now enter below command in terminal to install gparted :

sudo apt-get install gparted
Ashu_FalcoN
  • 2,118
0

It feels so good to upvote the two answers ahead of mine. I am only commenting because I feel strongly that while I grok their answers, I feel a plain-English interpretation of the solution would be better appreciated by some. Here goes:

While the observation of the first answer is correct, and yes, your terminal command was in error for Ubuntu, your best bet is to use the graphical software installation utility to install gparted. The following simplified instructions will permit anyone, with even the most minimal understanding of any operating system at all, to install GPARTED in less than one minute.

  1. Press your Windows key.
  2. Type the keyboard characters SO When the Ubuntu Software Center icon is displayed, click on that, or simply press your ENTER key.
  3. When the Software Center has loaded, type the keyboard characters, GPA
  4. When the Gparted Partition Editor option appears, click that. It should turn orange.
  5. Press the INSTALL button.
  6. Wait 20 seconds while it installs.

There is nothing wrong with becoming proficient with terminal commands. It is especially useful if your goal is to compose scripts for complex installation problem solving. However to simply install one program such as GPARTED, the software center is actually faster.

gyropyge
  • 2,568