Tôi đang sử dụng hình ảnh nginx
dựa trên dockerfile/ubuntu
. Trên gắn liền với vỏ container Docker củaLỗi trình cắm: Không thể định vị gói git
docker exec -it <container_id> /bin/bash
tôi muốn làm một git pull
vì vậy tôi cố gắng cài đặt git
nhưng apt
là không thể tìm thấy gói:
[email protected]:/# apt-get install git
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package git
Làm sao chúng ta có thể cài đặt git
từ hình ảnh đó và tại sao nó bị thiếu?
mèo /etc/apt/sources.list
deb http://httpredir.debian.org/debian wheezy main
deb http://httpredir.debian.org/debian wheezy-updates main
deb http://security.debian.org wheezy/updates main
deb http://nginx.org/packages/mainline/debian/ wheezy nginx
mèo /etc/apt/sources.list.d/*
cat: /etc/apt/sources.list.d/*: No such file or directory
apt- bộ nhớ cache madison git
N: Unable to locate package git
'root @ ....' bạn đã là người dùng siêu, vì vậy sudo không tồn tại afaik. – Sean
@SeanKenny cảm ơn, hãy để tôi thuật lại câu hỏi – Nyxynyx
hiển thị 'cat/etc/apt/sources.list',' cat/etc/apt/sources.list.d/* 'và' apt-cache madison git' để chẩn đoán. –