package operation failed
Get message 'package operation failed' when trying to update Ubuntu 24.04.1 LTS.
Question information
- Language:
- English Edit question
- Status:
- Answered
- For:
- Ubuntu Edit question
- Assignee:
- No assignee Edit question
- Last query:
- Last reply:
Revision history for this message
|
#1 |
What is the full output of:
sudo apt update; df -h
Thanks
Revision history for this message
|
#2 |
Hit:1 http://
Hit:2 http://
Hit:3 http://
Hit:4 http://
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
8 packages can be upgraded. Run 'apt list --upgradable' to see them.
W: Target Sources (main/source/
W: Target Sources (restricted/
W: Target Sources (universe/
W: Target Sources (multiverse/
W: Target Sources (main/source/
W: Target Sources (restricted/
W: Target Sources (universe/
W: Target Sources (multiverse/
W: Target Sources (main/source/
W: Target Sources (restricted/
W: Target Sources (universe/
W: Target Sources (multiverse/
W: Target Sources (main/source/
W: Target Sources (restricted/
W: Target Sources (universe/
W: Target Sources (multiverse/
W: Target Sources (main/source/
W: Target Sources (restricted/
W: Target Sources (universe/
W: Target Sources (multiverse/
W: Target Sources (main/source/
W: Target Sources (restricted/
W: Target Sources (universe/
W: Target Sources (multiverse/
df-h: command not found
Revision history for this message
|
#3 |
1. There is a space character missing in the command, try again with
df -h
2. There seem to be some duplicates in your package management configuration.
What output do you receive for the command
cat -n /etc/apt/
Revision history for this message
|
#4 |
Hit:1 http://
Hit:2 http://
Hit:3 http://
Hit:4 http://
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
14 packages can be upgraded. Run 'apt list --upgradable' to see them.
W: Target Sources (main/source/
W: Target Sources (restricted/
W: Target Sources (universe/
W: Target Sources (multiverse/
W: Target Sources (main/source/
W: Target Sources (restricted/
W: Target Sources (universe/
W: Target Sources (multiverse/
W: Target Sources (main/source/
W: Target Sources (restricted/
W: Target Sources (universe/
W: Target Sources (multiverse/
W: Target Sources (main/source/
W: Target Sources (restricted/
W: Target Sources (universe/
W: Target Sources (multiverse/
W: Target Sources (main/source/
W: Target Sources (restricted/
W: Target Sources (universe/
W: Target Sources (multiverse/
W: Target Sources (main/source/
W: Target Sources (restricted/
W: Target Sources (universe/
W: Target Sources (multiverse/
Filesystem Size Used Avail Use% Mounted on
tmpfs 377M 5.3M 372M 2% /run
/dev/sda1 455G 368G 64G 86% /
tmpfs 1.9G 0 1.9G 0% /dev/shm
tmpfs 5.0M 8.0K 5.0M 1% /run/lock
tmpfs 377M 184K 377M 1% /run/user/1000
/dev/sdb1 15G 1.2G 14G 8% /media/
brian@brian-
cat: invalid option -- '/'
Try 'cat --help' for more information.
brian@brian-
Usage: cat [OPTION]... [FILE]...
Concatenate FILE(s) to standard output.
Revision history for this message
|
#5 |
Please be more careful with the commands.
You skipped a space character also in the next command, please try again:
cat -n /etc/apt/
Revision history for this message
|
#6 |
There is a space after "cat" and a space after "-n". If you copy and paste the command you are less likely to botch it
Revision history for this message
|
#7 |
brian@brian-
1 # deb cdrom:[Ubuntu 14.04.3 LTS _Trusty Tahr_ - Beta amd64 (20150805)]/ trusty main restricted
2 # deb cdrom:[Ubuntu 12.10 _Quantal Quetzal_ - Release i386 (20121017.2)]/ quantal main restricted
3 # deb cdrom:[Ubuntu 12.10 _Quantal Quetzal_ - Release i386 (20121017.2)]/ quantal main restricted
4
5 # See http://
6 # newer versions of the distribution.
7 deb http://
8 deb-src http://
9
10 ## Major bug fix updates produced after the final release of the
11 ## distribution.
12 deb http://
13 deb-src http://
14
15 ## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
16 ## team. Also, please note that software in universe WILL NOT receive any
17 ## review or updates from the Ubuntu security team.
18 deb http://
19 deb http://
20
21 ## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
22 ## team, and may not be under a free licence. Please satisfy yourself as to
23 ## your rights to use the software. Also, please note that software in
24 ## multiverse WILL NOT receive any review or updates from the Ubuntu
25 ## security team.
26 deb http://
27 deb 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 deb http://
38 deb-src http://
39 deb http://
40 deb http://
41
42
43
44 # See http://
45 # newer versions of the distribution.
46
47 ## Major bug fix updates produced after the final release of the
48 ## distribution.
49
50 ## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
51 ## team. Also, please note that software in universe WILL NOT receive any
52 ## review or updates from the Ubuntu security team.
53
54 ## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
55 ## team, and may not be under a free licence. Please satisfy yourself as to
56 ## your rights to use the software. Also, please note that software in
57 ## multiverse WILL NOT receive any review or updates from the Ubuntu
58 ## security team.
59
60 ## N.B. software from this repository may not have been tested as
61 ## extensively as that contained in the main release, although it includes
62 ## newer versions of some applications which may provide useful features.
63 ## Also, please note that software in backports WILL NOT receive any review
64 ## or updates from the Ubuntu security team.
65
66
67
68
69 # See http://
70 # newer versions of the distribution.
71 deb-src http://
72
73 ## Major bug fix updates produced after the final release of the
74 ## distribution.
75 deb-src http://
76
77 ## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
78 ## team. Also, please note that software in universe WILL NOT receive any
79 ## review or updates from the Ubuntu security team.
80 deb-src http://
81 deb-src http://
82
83 ## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
84 ## team, and may not be under a free licence. Please satisfy yourself as to
85 ## your rights to use the software. Also, please note that software in
86 ## multiverse WILL NOT receive any review or updates from the Ubuntu
87 ## security team.
88 deb-src http://
89 deb-src http://
90
91 ## N.B. software from this repository may not have been tested as
92 ## extensively as that contained in the main release, although it includes
93 ## newer versions of some applications which may provide useful features.
94 ## Also, please note that software in backports WILL NOT receive any review
95 ## or updates from the Ubuntu security team.
96
97 deb-src http://
98 deb-src http://
99 deb-src http://
100
101
Revision history for this message
|
#8 |
Open a terminal window and issue the command
sudo gnome-text-editor /etc/apt/
In the editor window that opens scroll down lo line 43 and delete everything from line 43 to the end of the file.
Then go back up to the start of the file and put a comment indicator (a # sign and a space character) in front of all lines that start with "deb-src", such that the lines 8, 13, 35 and 38 begin with
# deb-src
Then save the file and close the editor.
If you then run the command
sudo apt update
what output do you receive?
Can you help with this problem?
Provide an answer of your own, or ask brian porter for more information if necessary.