title: Failing to install Sublime Text 3 in Ubuntu 16.04 using apt-get command
body: <p>I had downloaded sublime previously directly from the browser as tarball and saved it in a folder (and of course extracted it).But this way I wasn't able to make Sublime my default editor and it didn't feature as an application when I tried to open a text file with a right-click.I read somewhere installing sublime text 3 using commands:</p>
  
  <pre><code>sudo add-apt-repository ppa:webupd8team/sublime-text-3
  sudo apt-get update
  sudo apt-get install sublime-text-installer
  </code></pre>
  
  <p>will solve my problem. So I directly deleted the Sublime_text3 folder saved in my Downloads directory and then used the given commands. But when I entered the 3rd command line I got the following error(just writing the error part):</p>
  
  <pre><code>subprocess new pre-installation script returned error exit status 1
  Errors were encountered while processing:/var/cache/apt/archives/sublime-text-installer_3126-2~webupd8~1_all.deb
  E: Sub-process /usr/bin/dpkg returned an error code (1)
  </code></pre>
  
  <p>Can anyone explain why this error is coming and suggest a way to solve this problem? Also if anyone can tell how I can set Sublime as my default text editor from the tarball downloaded from the sublime text 3 website. Thanks in advance!</p>