Original sources.list der Ubuntu 15.04 Google Cloud Compute-VM-Instanz

3673
Bruno Finger

Ich habe die sources.listDatei versehentlich von meiner Ubuntu-VM gelöscht, die auf einer Instanz der Google Compute Engine ausgeführt wird.

Als Amazon Web Services haben sie auch eigene Optimierungen sources.list. Ich brauche ein Original, bitte nicht.

UPDATE: Laut JakeGoulds Antwort sollte es eine Sicherungskopie sources.listder /etc/apt/genannten sources.list.saveDateien geben, aber ich habe diese Datei in meiner Installation nicht gefunden:

$ ls -la total 64  drwxr-xr-x 6 root root 4096 Sep 17 21:06 . drwxr-xr-x 100 root root 4096 Sep 17 21:22 .. drwxr-xr-x 2 root root 4096 Sep 9 06:54 apt.conf.d drwxr-xr-x 2 root root 4096 Apr 7 14:44 preferences.d -rw-r--r-- 1 root root 592 Sep 17 21:20 sources.list drwxr-xr-x 2 root root 4096 Sep 2 07:40 sources.list.d -rw-r--r-- 1 root root 17481 Sep 17 21:06 trusted.gpg -rw-r--r-- 1 root root 12335 Sep 2 07:17 trusted.gpg~ drwxr-xr-x 2 root root 4096 Apr 7 14:44 trusted.gpg.d 
1
Ich würde einfach eine neue Instanz erstellen und diese kopieren und dann die Instanz löschen. chrispomeroy vor 8 Jahren 1

2 Antworten auf die Frage

2
chrispomeroy
## Note, this file is written by cloud-init on first boot of an instance ## modifications made here will not survive a re-bundle. ## if you wish to make changes you can: ## a.) add 'apt_preserve_sources_list: true' to /etc/cloud/cloud.cfg ## or do the same in user-data ## b.) add sources in /etc/apt/sources.list.d ## c.) make changes to template file /etc/cloud/templates/sources.list.tmpl  # See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to # newer versions of the distribution. deb http://us-central1.gce.archive.ubuntu.com/ubuntu/ vivid main deb-src http://us-central1.gce.archive.ubuntu.com/ubuntu/ vivid main  ## Major bug fix updates produced after the final release of the ## distribution. deb http://us-central1.gce.archive.ubuntu.com/ubuntu/ vivid-updates main deb-src http://us-central1.gce.archive.ubuntu.com/ubuntu/ vivid-updates main  ## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu ## team. Also, please note that software in universe WILL NOT receive any ## review or updates from the Ubuntu security team. deb http://us-central1.gce.archive.ubuntu.com/ubuntu/ vivid universe deb-src http://us-central1.gce.archive.ubuntu.com/ubuntu/ vivid universe deb http://us-central1.gce.archive.ubuntu.com/ubuntu/ vivid-updates universe deb-src http://us-central1.gce.archive.ubuntu.com/ubuntu/ vivid-updates universe  ## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu  ## team, and may not be under a free licence. Please satisfy yourself as to ## your rights to use the software. Also, please note that software in  ## multiverse WILL NOT receive any review or updates from the Ubuntu ## security team. # deb http://us-central1.gce.archive.ubuntu.com/ubuntu/ vivid multiverse # deb-src http://us-central1.gce.archive.ubuntu.com/ubuntu/ vivid multiverse # deb http://us-central1.gce.archive.ubuntu.com/ubuntu/ vivid-updates multiverse # deb-src http://us-central1.gce.archive.ubuntu.com/ubuntu/ vivid-updates multiverse  ## Uncomment the following two lines to add software from the 'backports' ## repository. ## N.B. software from this repository may not have been tested as ## extensively as that contained in the main release, although it includes ## newer versions of some applications which may provide useful features. ## Also, please note that software in backports WILL NOT receive any review ## or updates from the Ubuntu security team. # deb http://us-central1.gce.archive.ubuntu.com/ubuntu/ vivid-backports main restricted universe multiverse # deb-src http://us-central1.gce.archive.ubuntu.com/ubuntu/ vivid-backports main restricted universe multiverse  ## Uncomment the following two lines to add software from Canonical's ## 'partner' repository. ## This software is not part of Ubuntu, but is offered by Canonical and the ## respective vendors as a service to Ubuntu users. # deb http://archive.canonical.com/ubuntu vivid partner # deb-src http://archive.canonical.com/ubuntu vivid partner  deb http://security.ubuntu.com/ubuntu vivid-security main deb-src http://security.ubuntu.com/ubuntu vivid-security main deb http://security.ubuntu.com/ubuntu vivid-security universe deb-src http://security.ubuntu.com/ubuntu vivid-security universe # deb http://security.ubuntu.com/ubuntu vivid-security multiverse # deb-src http://security.ubuntu.com/ubuntu vivid-security multiverse 
0
JakeGould

Sie müssen kein komplettes Ubuntu-Setup erstellen, nur um eine saubere Kopie des zu erhalten sources.list. Schauen Sie einfach in das /etc/apt/Verzeichnis:

ls -la /etc/apt/ 

sources.list.saveIn diesem Verzeichnis sollte sich ein einfaches Side-by-Side-Backup des Originals sources.listauf Ihrem System befinden. Natürlich sind alle Modifikationen / Verbesserungen, die Sie daran vorgenommen haben, verschwunden. Aber hey! Es ist besser als nichts. Kopieren Sie die Datei einfach so wie folgt:

sudo cp /etc/apt/sources.list.save /etc/apt/sources.list 

Und du solltest gut sein.

Leider konnte ich keine `sources.list.save` in meinem` / etc / apt`-Verzeichnis finden. $ ls -la Gesamtzahl 64 drwxr-xr-x 6-Wurzel 4096 Sep 17 21:06. drwxr-xr-x 100 wurzelwurzel 4096 Sep 17 21:22 .. drwxr-xr-x 2 wurzelwurzel 4096 Sep 9 06:54 apt.conf.d drwxr-xr-x 2 wurzelwurzel 4096 apr 7 14:44 voreinstellungen .d -rw-r - r-- 1 Wurzelwurzel 592 Sep 17 21:20 sources.list drwxr-xr-x 2 Wurzelwurzel 4096 Sep 2 07:40 sources.list.d -rw-r - r- - 1 wurzel wurzel 17481 Sep 17 21:06 trusted.gpg -rw-r - r-- 1 wurzel wurzel 12335 2. september 07:17 trusted.gpg ~ drwxr-xr-x 2 wurzel 4096 7. april 14:44 vertrauenswürdig .gpg.d ` Bruno Finger vor 8 Jahren 0
@BrunoFinger Tut mir leid, davon zu hören. Bitte kopieren Sie keine großen Blöcke von formatiertem Text wie diesen in einen Kommentar. Vielleicht möchten Sie dies zu Ihrer Frage hinzufügen, um darauf zu verweisen, was Sie überprüft haben, aber als Kommentar ist es nicht lesbar. JakeGould vor 8 Jahren 0
Sie haben recht, ein besserer Ansatz wäre, sie stattdessen der Frage hinzuzufügen. Ich habe im Moment nicht darüber nachgedacht. Bruno Finger vor 8 Jahren 1
@BrunoFinger Alles gut. Ich ging voran und fügte es Ihrer Frage für Sie hinzu. Fühlen Sie sich also frei, meine Formulierung zu bearbeiten, wenn Sie möchten. Ich denke, dass dies eine gute Information ist, um sie zu teilen. JakeGould vor 8 Jahren 0