how to install flash plugin on ubuntu 14.04 LTS 64-bit version

When I play online videos, they are often interrupted with many blinks and other disturbances. Many times I was shown an error message that the flash player crashed. When I tried to install the flash plugin on the command line, this error was displayed. Can anyone help me to get out of this conflict?

$ sudo apt-get install flashplugin-installer
[sudo] password for agha:
E: dpkg was interrupted, you must manually run 'sudo dpkg --configure -a' 
 to correct the problem

Here’s a full log:

Ign http://in.archive.ubunutu.com trusty-updates/restricted Translation-en_IN
Ign http://in.archive.ubunutu.com trusty-updates/universe Translation-en_IN
Ign http://in.archive.ubunutu.com trusty-backports/main Translation-en_IN
Ign http://in.archive.ubunutu.com trusty-backports/multiverse Translation-en_IN
Ign http://in.archive.ubunutu.com trusty-backports/restricted Translation-en_IN
Ign http://in.archive.ubunutu.com trusty-backports/universe Translation-en_IN
Fetched 964 kB in 42s (22.4 kB/s)
E: Could not get lock /var/lib/dpkg/lock - open (11: Resource temporarily unavailable)
E: Unable to lock the administration directory (/var/lib/dpkg/), is another process using it?
agha@agha-GA-78LMT-USB3:~$ sudo apt-get install wine1.7 winetricks
E: Could not get lock /var/lib/dpkg/lock - open (11: Resource temporarily unavailable)
E: Unable to lock the administration directory (/var/lib/dpkg/), is another process using it?
agha@agha-GA-78LMT-USB3:~$ sudo dpkg --configure -a
dpkg: error: dpkg status database is locked by another process
agha@agha-GA-78LMT-USB3:~$ sudo apt-get install -f
E: Could not get lock /var/lib/dpkg/lock - open (11: Resource temporarily unavailable)
E: Unable to lock the administration directory (/var/lib/dpkg/), is another process using it?

Solution 1:

The following works for me! I was trying to install the wireless driver when this error came. Had to delete the files and also the lock files.

sudo rm /var/lib/apt/lists/lock
sudo rm /var/cache/apt/archives/lock
cd /var/lib/dpkg/updates
sudo rm *
sudo apt-get update

and then you can run your apt-get install to whatever package you want to install

Solution 2:

Run sudo dpkg --configure -a and it should be able to correct itself.

or else

sudo apt-get install -f (fix broken packages) and then try running sudo dpkg --configure -a again.

You see how to install flash player in Ubuntu form following link
http://www.wikihow.com/Install-Flash-Player-on-Ubuntu

Updated Answer :

dpkg is locked, try the following solution and follow the above (link) steps to install flash palyer.

Unable to lock the administration directory (/var/lib/dpkg/) is another process using it?