Can't install adb
I can't install adb on my Ubuntu 20.04.4 LTS through my terminal using the command "sudo apt install android-tools-adb" or "sudo apt install adb"
It basically gives this output :
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package adb
Is there any solution regarding this ?
Question information
- Language:
- English Edit question
- Status:
- Solved
- For:
- Ubuntu Edit question
- Assignee:
- No assignee Edit question
- Solved by:
- Manfred Hampl
- Solved:
- Last query:
- Last reply:
Revision history for this message
|
#1 |
The package adb is in the "universe" repository for focal. Maybe you haven't activated it.
For diagnostic purposes please provide the output that you receive for the following commands:
uname -a
lsb_release -crid
find /etc/apt -name '*.list' -exec bash -c 'echo -e "\n$1\n"; cat -n "$1"' _ '{}' \;
Revision history for this message
|
#2 |
#1. uname -a :
Linux Explorer 5.13.0-41-generic #46~20.04.1-Ubuntu SMP Wed Apr 20 13:16:21 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
#2. lsb_release -crid :
Distributor ID: Ubuntu
Description: Ubuntu 20.04.4 LTS
Release: 20.04
Codename: focal
#3. find /etc/apt -name '*.list' -exec bash -c 'echo -e "\n$1\n"; cat -n "$1"' _ '{}' \; :
/etc/apt/
1 deb http://
2 # deb-src http://
/etc/apt/
1 deb http://
2 # deb-src http://
/etc/apt/
1 deb http://
2 # deb-src http://
/etc/apt/
1 ### THIS FILE IS AUTOMATICALLY CONFIGURED ###
2 # You may comment out this entry, but any other modifications may be lost.
3 deb [arch=amd64,
/etc/apt/
1 deb http://
2 # deb-src http://
/etc/apt/
1 # deb cdrom:[Ubuntu 20.04.4 LTS _Focal Fossa_ - Release amd64 (20220223)]/ focal main restricted
2 deb-src http://
3
4 # See http://
5 # newer versions of the distribution.
6 deb http://
7 deb-src http://
8
9 ## Major bug fix updates produced after the final release of the
10 ## distribution.
11 deb http://
12 deb-src http://
13
14 ## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
15 ## team. Also, please note that software in universe WILL NOT receive any
16 ## review or updates from the Ubuntu security team.
17 # deb-src http://
18 # deb-src http://
19
20 ## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
21 ## team, and may not be under a free licence. Please satisfy yourself as to
22 ## your rights to use the software. Also, please note that software in
23 ## multiverse WILL NOT receive any review or updates from the Ubuntu
24 ## security team.
25 deb http://
26 # deb-src http://
27 deb http://
28 # deb-src http://
29
30 ## N.B. software from this repository may not have been tested as
31 ## extensively as that contained in the main release, although it includes
32 ## newer versions of some applications which may provide useful features.
33 ## Also, please note that software in backports WILL NOT receive any review
34 ## or updates from the Ubuntu security team.
35 deb http://
36 deb-src http://
37
38 ## Uncomment the following two lines to add software from Canonical's
39 ## 'partner' repository.
40 ## This software is not part of Ubuntu, but is offered by Canonical and the
41 ## respective vendors as a service to Ubuntu users.
42 deb http://
43 deb-src http://
44
45 deb http://
46 deb-src http://
47 # deb-src http://
48 deb http://
49 # deb-src http://
50
51 # This system was installed using small removable media
52 # (e.g. netinst, live or single CD). The matching "deb cdrom"
53 # entries were disabled at the end of the installation process.
54 # For information about how to configure apt package sources,
55 # see the sources.list(5) manual.
56 deb http://
57 # deb-src http://
Revision history for this message
|
#3 |
Your configuration settings are inconsistent.
Issue the command
sudo gedit /etc/apt/
and perform the following changes:
line 12: remove the word "multiverse"
line 17: replace "# deb-src" by "deb"
line 35 and line 36: add "universe" to the end of the lines
line 46: remove the word "multiverse"
after line 46 insert the following line (identical to line 47 except the first word):
deb http://
remove line 2 (containing "//archive.
Finally put a comment indicator ("# ") in front of all lines that begin with "deb-src" (where that is not yet the case).
Then save the file and close the editor.
When that is done please execute the commands
cat -n /etc/apt/
sudo apt update
and copy/paste the output that we can check.
Revision history for this message
|
#4 |
For the first command I get this :
1 # deb cdrom:[Ubuntu 20.04.4 LTS _Focal Fossa_ - Release amd64 (20220223)]/ focal main restricted
2
3 # See http://
4 # newer versions of the distribution.
5 deb http://
6 # deb-src http://
7
8 ## Major bug fix updates produced after the final release of the
9 ## distribution.
10 deb http://
11 # deb-src http://
12
13 ## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
14 ## team. Also, please note that software in universe WILL NOT receive any
15 ## review or updates from the Ubuntu security team.
16 # deb http://
17 # deb-src http://
18
19 ## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
20 ## team, and may not be under a free licence. Please satisfy yourself as to
21 ## your rights to use the software. Also, please note that software in
22 ## multiverse WILL NOT receive any review or updates from the Ubuntu
23 ## security team.
24 deb http://
25 # deb-src http://
26 deb http://
27 # deb-src http://
28
29 ## N.B. software from this repository may not have been tested as
30 ## extensively as that contained in the main release, although it includes
31 ## newer versions of some applications which may provide useful features.
32 ## Also, please note that software in backports WILL NOT receive any review
33 ## or updates from the Ubuntu security team.
34 deb http://
35 # deb-src http://
36
37 ## Uncomment the following two lines to add software from Canonical's
38 ## 'partner' repository.
39 ## This software is not part of Ubuntu, but is offered by Canonical and the
40 ## respective vendors as a service to Ubuntu users.
41 deb http://
42 # deb-src http://
43
44 deb http://
45 # deb-src http://
46 deb http://
47 # deb-src http://
48 deb http://
49 # deb-src http://
50
51 # This system was installed using small removable media
52 # (e.g. netinst, live or single CD). The matching "deb cdrom"
53 # entries were disabled at the end of the installation process.
54 # For information about how to configure apt package sources,
55 # see the sources.list(5) manual.
56 deb http://
57 # deb-src http://
As for the second one it's :
Hit:1 http://
Hit:2 http://
Hit:3 http://
Get:4 http://
Hit:5 http://
Err:4 http://
The following signatures couldn't be verified because the public key is not available: NO_PUBKEY C072A32983A736CF
Hit:6 http://
Hit:7 http://
Hit:8 http://
Hit:9 http://
Hit:10 http://
Hit:11 http://
Reading package lists... Done
W: GPG error: http://
E: The repository 'http://
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
Revision history for this message
|
#5 |
Sorry I made a mistake at line 16 didn't remove the "#". Now it is works.
Revision history for this message
|
#6 |
I'm a beginner at Linux what can I do to improve some basic commands and other knowledge like the problem I'm facing now. please do answer :)
Revision history for this message
|
#8 |
Thanks Manfred Hampl, that solved my question.
Revision history for this message
|
#9 |
That looks better, but not fully right yet. I am sorry, but my instructions were not fully correct.
again issue the command
sudo gedit /ect/apt/
and do the following changes:
line 35: move the word "universe" from the end of the line behind the word "multiverse" (in front of "#Added ...")
line 6: remove the word multiverse
lines 16 and 17: replace the current two lines by these four lines:
deb http://
# deb-src http://
deb http://
# deb-src http://
save the file and close the editor.
issue the command
sudo apt-key adv --keyserver keyserver.