Updated. :July the 1st 2020
You have tried to install GParted from the Ubuntu software center but you received the error below :Could not get lock /var/lib/dpkg/lock’ Error in Ubuntu
From the error message above, one can tell that the reason might be related to the lock file. When two processes have access to the same resource, the first one will lock it up while the second one will wait until it gets unlocked. In other words, processes serialize their actions via this file locking mechanism. This is to prevent conflicts and inconsistencies. This principle is used heavily in operating systems.
In our case, it could be that the lock files were not deleted, for instance when the previous apt command process was not terminated properly which therefore will not allow other processes from executing any new apt/apt-get commands.
The following will help solve this problem. First open up the terminal and execute the commands shown below :
If either of the above commands return a number, which will be the process ID, go ahead an kill it using the command :
sudo kill -9 PID
Now issue the commands below which will remove the lock files:
And then reconfigure the packages via the command below:
Finally run :
sudo apt update :
Now run the command below in order to install GParted :
sudo apt install gparted [Install gparted Ubuntu]
Ubuntu gparted install
Parted Magic is based on the GParted software which handles partitioning tasks with ease. An extensive collection of file system tools are also included. It supports the following file systems : btrfs, ext2, ext3, ext4, fat16, fat32, hfs, hfs +, jfs, linux-swap, ntfs, reiserfs, reiser4, and xfs.
It is a good solution for hard disk management. You can use it to partition, clone partitions, erase disks, benchmark and analyze performance , for example.
MORE INFORMATION : Official Website
If you like the content, we would appreciate your support by buying us a coffee. Thank you so much for your visit and support.