Q: Error while updating software Ubuntu 18.04 LTS I am getting below error while updating software. 
Edit : I am getting the same error when I run 'sudo apt-get upgrade'.
[  1201.873] _XSERVTransSocketUNIXCreateListener: ...SocketCreateListener() failed

[  1201.873] _XSERVTransMakeAllCOTSServerListeners: server already running
[  1201.874] (EE) 

Fatal server error:
[  1201.874] (EE) Cannot establish any listening sockets - Make sure an X server isn't already running(EE) 
[  1201.874] (EE) 

Please consult the The X.Org Foundation support 
     at http://wiki.x.org
 for help. 
[  1201.874] (EE) Please also check the log file at "/var/log/Xorg.0.log" for additional information.

[  1201.874] (EE) 
[  1201.874] (EE) Server terminated with error (1). Closing log file

Log File Output (/var/log/Xorg.0.log)
[   197.261] _XSERVTransSocketUNIXCreateListener: ...SocketCreateListener() failed

[   197.261] _XSERVTransMakeAllCOTSServerListeners: server already running
[   197.261] (EE) 

Fatal server error:
[   197.261] (EE) Cannot establish any listening sockets - Make sure an X server isn't already running(EE) 

[   197.261] (EE) 
Please consult the The X.Org Foundation support 
     at http://wiki.x.org
 for help. 

[   197.261] (EE) Please also check the log file at "/var/log/Xorg.0.log" for additional information.
[   197.261] (EE) 
[   197.261] (EE) Server terminated with error (1). Closing log file.

Step 1:  
Step 2 (Error message): 
Step 3: 

A: I had the same issue when i first installed the 18.04 LTS version for the first time it's the issue with the 'xserver-xorg' what i done was is reinstalling xserver-xorg 
before you reinstall it remove  .XAuthority files by using this command:
sudo rm /home/[your username]/.XAuthority*

reinstall xserver-xorg by using this command :
 sudo apt-get install --reinstall xorg

hope this answer will fix your issue. 
