what is the function of /etc/apt/sources.list.d?
The function of the /etc/apt/sources.list.d
directory is as follows:
Using the directory you can easily add new repositories without the need to edit the central /etc/apt/sources.list
file. I.e. you can just put a file with a unique name and the same format as /etc/apt/sources.list
into this folder and it is used by apt.
In order to remove this source again you can just remove that specific file without the need for handling side effects, parsing or mangling with /etc/apt/sources.list
. It's mainly for scripts or other packages to put their repositories there automatically - if you manually add repositories you could add them to /etc/apt/sources.list
manually.
This answers your question, however, it won't solve your problem. APT is complaining about a missing GPG key which you have to manually import before you can use your newly added repository (GPG verifies all data cryptographically and needs the public keys of the owners for this).
This can be done calling sudo apt-key add public-key-file
or wget -qO - http://example.com/archive.key | sudo apt-key add -
where http://example.com/archive.key
is the URL for the public key (which you should verify before using).
In case of llvm, you could issue wget -O - http://llvm.org/apt/llvm-snapshot.gpg.key|sudo apt-key add -
(according to http://llvm.org/apt/)
Fore more details see
- How to add a GPG key to the apt sources keyring?
Get package source from sources.list.d
This line:
Get:1 http://us.archive.ubuntu.com/ubuntu bionic/universe suricata 3.2-2ubuntu3 (dsc) [2,768 B]
will tell you from where the package has been downloaded, it is from universe
repository.
You need to enable the source package for the added PPA:
echo "deb-src http://ppa.launchpad.net/oisf/suricata-stable/ubuntu bionic main" |
sudo tee -a /etc/apt/sources.list.d/oisf-suricata-stable-bionic.list
sudo apt update
apt source suricata
Repositories in sources.list (Debian)
You can sort out the error by comment out all the repolist except as follow in the sources.list.
deb http://ftp.us.debian.org/debian stable main
deb http://ftp.de.debian.org/debian squeeze main non-free
deb http://security.debian.org/ squeeze/updates main contrib
E: Malformed entry 1 in list file /etc/apt/sources.list.d/docker.list (Component)
To make sure that /etc/apt/sources.list.d/docker.list
is formatted correctly use the following command (tee
without -a
to override the source):
On debian Buster:
printf "%s\n" "deb [arch=amd64] https://download.docker.com/linux/debian buster stable" |\
sudo tee /etc/apt/sources.list.d/docker.list
On debian Stretch:
printf "%s\n" "deb [arch=amd64] https://download.docker.com/linux/debian stretch stable" |\
sudo tee /etc/apt/sources.list.d/docker.list
(You can use $(lsb_release -cs)
instead of debian codename which require lsb-release
package to be installed.)
An alternative way to add docker-ce
repository: You have already installed software-properties-common
, you can use add-apt-repository
to add the repository:
sudo add-apt-repository \
"deb [arch=amd64] https://download.docker.com/linux/debian \
$(lsb_release -cs) \
stable"
Docker-ce docs
add debian repository with sed command
sed -i '$ a\\ndeb http://packages.dotdeb.org wheezy all\ndeb-src http://packages.dotdeb.org wheezy all' /etc/apt/sources.list
Related Topics
Make Command Not Working in Ns 2.35
Giving Linux User Git Access But Not Shell Access
Different Show Between "Cat" and "Vim"
How to Get Argv from "Struct Linux_Binprm"
Level Triggered Interrupt Handling and Nested Interrupts
Phony Targets for Parallel Execution of Make
How to Check If Emacs in Frame or in Terminal
How to Create Files with Special Characters in Linux
How to Stop Page Cache for Disk I/O in My Linux System
Floating Point Exception (Core Dumped) While Doing Division in Assembly
Can't Untar a Complete Directory Using Tar -Cvpzf
Code for Wait_Event_Interruptible
Why Doesn't ''Var=Value Echo $Var'' Emit Value
How to Continously Run a Unix Script in Background Without Using Crontab.
Relative-To-Executable Path to Ld-Linux Dynamic Linker/Interpreter