Hot answers tagged

1675 votes
Accepted

How can I update my nodeJS to the latest version?

Use n module from npm in order to upgrade node sudo npm cache clean -f sudo npm install -g n sudo n stable To upgrade to latest version (and not current stable) version, you can use sudo n latest ...
user avatar
  • 17k
618 votes
Accepted

How do I install Python 3.6 using apt-get?

Ubuntu 14.04 (Trusty) and 16.04 (Xenial) Deadsnakes removed support for 16.04. You can use this unofficial repo for now. https://github.com/deadsnakes/issues/issues/195 sudo add-apt-repository -y ppa:...
user avatar
  • 22.8k
602 votes

How can I update my nodeJS to the latest version?

Complete installation instructions have since been uploaded here by Nodesource. It is copied below for your reference. Instructions are the same for updating to the latest version. If you don't like ...
user avatar
  • 6,755
558 votes
Accepted

Dwarf Fortress starting during apt-get upgrade

With a question as weird as this, it's of course impossible to say for sure -- but I'll eat my hat if my first hunch isn't correct. :) The only way I can think of, how such unrelated things could be ...
user avatar
444 votes
Accepted

Skipping acquire of configured file 'main/binary-i386/Packages' as repository 'xxx' doesn't support architecture 'i386'

I tracked down offending repo (any for Google chrome in this dir) cd /etc/apt/sources.list.d grep chrome * | grep -v amd64 or more generally grep -r google /etc/apt | grep -v amd64 Now do same ...
user avatar
417 votes

Error sudo: add-apt-repository: command not found

For Ubuntu 14.04 or later you need to install the software-properties-common package: sudo apt install software-properties-common I found the solution in this blog: Ubuntu Server 14.4 (Trusty Tahr) –...
user avatar
  • 4,271
362 votes

E: Could not get lock /var/lib/dpkg/lock-frontend - open (11: Resource temporarily unavailable)

This may happen if 'Synaptic Package Manager' or 'Software Updater' is open. Some apt command is running in Terminal. Some apt process is running in background. For above wait for the process to ...
user avatar
  • 6,826
336 votes
Accepted

apt-get stuck at 0 [Connecting to us.archive.ubuntu.com]

I figured out how to get apt-get to work again. Edit gai.conf: sudo vim /etc/gai.conf change line ~54 to uncomment the following: precedence ::ffff:0:0/96 100 write and quit: :wq CAUTION Look ...
user avatar
330 votes

E: Unable to correct problems, you have held broken packages

Use aptitude instead of apt-get. It is more intelligent. It not only will handle downgrading conflicting packages for you, but will make a series of recommendations asking you which of many possible ...
user avatar
  • 3,733
325 votes

"The following packages have been kept back:" Why and how do I solve it?

I answered a similar question here. Try this Unix SE answer: sudo apt-get --with-new-pkgs upgrade This allows new packages to be installed. It will let you know what packages would be installed and ...
user avatar
310 votes
Accepted

Avoiding user interaction with tzdata when installing certbot in a docker container

To run dpkg (behind other tools like Apt) without interactive dialogue, you can set one environment variable as DEBIAN_FRONTEND=noninteractive For example, you can set it in Dockerfile using ARG: ...
user avatar
306 votes

Explicitly accept change for PPA 'Label'

It would help if you posted your repositories, but, with that said, you sort of have 2 ways to fix this. First would be to use apt rather than apt-get. apt is preferred over apt-get for interactive ...
user avatar
  • 97.5k
305 votes
Accepted

How can I fix apt error "W: Target Packages ... is configured multiple times"?

Recent, up-to-date solution I wrote a Python script to automate this task. You can find the most recent version here. Installation: Install the prerequisites: sudo apt install python3-apt Download ...
user avatar
300 votes
Accepted

How to list manually installed packages?

You can use either of these two one-liners. Both yield the exact same output on my machine and are more precise than all solutions proposed up until now (July 6, 2014) in this question. Using apt-...
user avatar
  • 4,425
259 votes

npm : Depends: node-gyp (>= 0.10.9) but it is not going to be installed

I was able to install npm by doing following: sudo apt-get install nodejs-dev node-gyp libssl1.0-dev and sudo apt-get install npm
user avatar
  • 2,599
256 votes
Accepted

Installing PHP 5.6 on Xenial (16.04)

Remove all the stock php packages List installed php packages with dpkg -l | grep php| awk '{print $2}' |tr "\n" " " then remove unneeded packages with sudo aptitude purge your_packages_here or if ...
user avatar
  • 4,853
254 votes

How can I remove gpg key that I added using apt-key add -?

On 16.10 the short key id is no longer shown when you use the list command, but it is actually the last 8 characters of the long hex. So for example the key id for the following key /etc/apt/trusted....
user avatar
  • 2,549
253 votes
Accepted

How do I install a different Python version using apt-get?

Felix Krull runs a PPA offering basically any version of Python (seriously, there is 2.3.7 build for vivid...) for many Ubuntu releases at https://launchpad.net/~deadsnakes/+archive/ubuntu/ppa. Do the ...
user avatar
  • 5,145
247 votes
Accepted

Why is Ubuntu moving to Snap packages?

Snap attempts to solve one of the fundamental problems with Linux as a desktop operating system: software availability and software distribution. Snap is not intended to completely replace debs, ...
user avatar
235 votes
Accepted

apt gives “Unstable CLI Interface” warning

apt is for the terminal and gives beautiful output while apt-get and apt-cache are for scripts and give stable, parsable output. The script equivalent of your apt show command therefore is: apt-cache ...
user avatar
  • 37.6k
224 votes
Accepted

How do I install PostgreSQL 9.6 on any Ubuntu version?

For the following Ubuntu versions, you can install with the given commands, as per the official PostgreSQL Apt Repository. Ubuntu 17.04 - 17.10 Version 9.6 comes with the distribution. sudo apt-get ...
user avatar
  • 9,153
219 votes
Accepted

How do I install the latest version of Git with apt?

Use the PPA from the maintainers of git on Ubuntu: sudo apt-add-repository ppa:git-core/ppa sudo apt-get update sudo apt-get install git If you don't know what PPAs are, first read What are PPAs and ...
user avatar
  • 183k
208 votes
Accepted

What does -y mean in apt-get -y install command?

From the results of running man apt-get -y, --yes, --assume-yes Automatic yes to prompts; assume "yes" as answer to all prompts and run non-interactively. If an undesirable ...
user avatar
  • 100k
204 votes

installing pip3 (for python3) on ubuntu 16.04 LTS using a proxy

The first procedure you followed is correct sudo apt-get -y install python3-pip But before installing try to update using command sudo apt-get update If first did not work then you can also do ...
user avatar
  • 2,341
202 votes

apt-get update stuck: Connecting to security.ubuntu.com

This worked for me, courtesy of Zach Adams (https://zach-adams.com/2015/01/apt-get-cant-connect-to-security-ubuntu-fix/): Turns out this is an issue where connecting over IPv6 on some servers ...
user avatar
192 votes

How do I re-run boot loader?

According to womble's answer to Damaged /vmlinuz and /initrd.img symbolic links after Kernel uninstall (on Server Fault), you don't have to do anything in this situation when your boot loader is GRUB/...
user avatar
185 votes

Error :: You must put some 'source' URIs in your sources.list

software-properties-gtk option "Source code" I recommend this for the desktop: software-properties-gtk then under the "Ubuntu Software" tab click "Source code": This ...
user avatar
181 votes

How can I see all versions of a package that are available in the archive?

The command apt list -a <package name> is the equivalent of madison.
175 votes

29 packages can be updated - How?

Try these commands (although the third one may not be necessary for you): sudo apt-get update sudo apt-get upgrade sudo apt-get dist-upgrade A reboot may or may not be necessary (sudo shutdown -r 0)
user avatar
  • 1,879
167 votes
Accepted

There is no public key available for the following key IDs 1397BC53640DB551

I resolved running: sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 1397BC53640DB551 The command above download the missing key using the hexadecimal numbers given in the error (...
user avatar
  • 3,249

Only top scored, non community-wiki answers of a minimum length are eligible