Questions tagged [apt]

Debian's Advanced Packaging Tool whose main binary is apt-get. Most questions about APT are off topic for Stack Overflow, unless it is clearly related to a programming tool.

Advanced Packaging Tool, the Debian software package manager which keeps track of the software repositories for the system, which offers package dependency resolution, upgrade of the installed packages, download and installation of new software.

1492 questions
88
votes
6 answers

Removing broken packages in Ubuntu

There was an error when I tried to remove a package, so it was left in a broken state. I tried the following: sudo dpkg --remove --force-remove-reinstreq rvm Output: (Reading database ... 41743 files and directories currently installed.) Removing…
Leo Jiang
  • 24,497
  • 49
  • 154
  • 284
88
votes
12 answers

How do you run `apt-get` in a dockerfile behind a proxy?

I am running a virtual machine (Ubuntu 13.10) with docker (version 0.8.1, build a1598d1). I am trying to build an image with a dockerfile. First, I want to update the packages (using the code below - the proxy is obfuscated) but apt-get times out…
Christopher Louden
  • 7,540
  • 2
  • 26
  • 29
86
votes
10 answers

Installing R from CRAN Ubuntu repository: No Public Key Error

I am on R version 2.13 and would like to update to a newer version in order to use some packages that depend on R>= 2.14. I have the line to my sources.list file as found described here. I then navigate to the terminal and type: sudo apt-get…
Btibert3
  • 38,798
  • 44
  • 129
  • 168
80
votes
15 answers

Windows10 WSL2 Ubuntu / Debian # no network

After upgrading from WSL to WSL2 sudo apt-get update not works any longer. After: wsl --set-version Ubuntu-18.04 2 Output is: > sudo apt-get update Err:1 http://security.ubuntu.com/ubuntu bionic-security InRelease Temporary failure resolving…
Jundl
  • 3,084
  • 3
  • 15
  • 16
80
votes
2 answers

How to trust a apt repository : Debian apt-get update error public key is not available: NO_PUBKEY

Trying to update some repositories on Debian Etch installation and getting the following errors from running "apt-get update" W: GPG error: http://www.debian-multimedia.org etch Release: The following signatures couldn't be verified because teh…
Chris Harris
  • 4,705
  • 3
  • 24
  • 22
78
votes
4 answers

How to circumvent "apt-key output should not be parsed"?

I'm automating my Docker installation. Something like this: if apt-key fingerprint 0EBFCD88 | grep "Key fingerprint = 9DC8 5822 9FC7 DD38 854A E2D8 8D81 803C 0EBF CD88" > /dev/null then # proceed fi This worked fine in older versions of apt-key,…
Sander Verhagen
  • 8,540
  • 4
  • 41
  • 63
77
votes
2 answers

/bin/sh: 1: apk: not found while creating docker image

I have the below Dockerfile for zookeeper and I am trying to create an image for it, but it is giving me an error. I have recently started working with Docker, and started playing with a Zookeeper setup, so I am not able to understand. What does…
john
  • 11,311
  • 40
  • 131
  • 251
66
votes
1 answer

Docker error: Unable to locate package git

I'm using an image nginx which is based on dockerfile/ubuntu. On attaching to the docker container's shell docker exec -it /bin/bash I want to do a git pull so I tried installing git but apt is unable to find the…
Nyxynyx
  • 61,411
  • 155
  • 482
  • 830
64
votes
4 answers

pip 10 and apt: how to avoid "Cannot uninstall X" errors for distutils packages

I am dealing with a legacy Dockerfile. Here is a very simplified version of what I am dealing with: FROM ubuntu:14.04 RUN apt-get -y update && apt-get -y install \ python-pip \ python-numpy # ...and many other packages RUN pip install -U…
elethan
  • 16,408
  • 8
  • 64
  • 87
55
votes
8 answers

gcc: error trying to exec 'cc1plus': execvp: No such file or directory

I'm trying to install this python module, which requires compilation (on Ubuntu 16.04). I'm struggling to understand exactly what's causing it stall; what am I missing? (xenial)chris@localhost:~$ pip install swigibpy Collecting swigibpy Using…
cjm2671
  • 18,348
  • 31
  • 102
  • 161
54
votes
5 answers

Caching APT packages in GitHub Actions workflow

I use the following Github Actions workflow for my C project. The workflow finishes in ~40 seconds, but more than half of that time is spent by installing the valgrind package and its dependencies. I believe caching could help me speed up the…
natiiix
  • 1,005
  • 1
  • 13
  • 21
53
votes
5 answers

Auto yes to the License Agreement on sudo apt-get -y install oracle-java7-installer

The Oracle Java package for Ubuntu interactively asks about the License Agreement. So I have to say 'OK' and then 'yes' every time, but I'd like to automate it. What I do is this: sudo add-apt-repository -y ppa:webupd8team/java sudo apt-get…
kojiwell
  • 872
  • 1
  • 10
  • 10
52
votes
1 answer

Getting apt-get on an alpine container

I have to install a few dependencies on my docker container, I want to use python:3.6-alpine version to have it as light as possible, but apk package manager which comes with alpine is giving me trouble so I would like to get the apt-get package…
NotSoShabby
  • 3,316
  • 9
  • 32
  • 56
46
votes
12 answers

How can I get Chef to run apt-get update before running other recipes

Right now I have the following in my Vagrantfile: config.vm.provision :chef_solo do |chef| chef.cookbooks_path = "cookbooks" chef.add_recipe "apt" chef.add_recipe "build-essential" chef.add_recipe "chef-redis::source" …
ashchristopher
  • 25,143
  • 18
  • 48
  • 49
46
votes
7 answers

"E: Unable to locate package python3-pip"

I am unable to locate package python-pip: Reading package lists... Done Building dependency tree Reading state information... Done E: Unable to locate package python3-pip How can I resolve this problem?
Jagdip Singh Sandhu
  • 1,195
  • 1
  • 8
  • 7