how fix unexpected token in deb http://archive.canonical.com/precise partner

Asked by Cliffm

Hello
Thanks in advance.
Cliff

How to fix?

installed
sudo add-apt-repository "deb http://archive.canonical.com/ precise partner"

Now recieve this when attempting to open Snyaptic Package Manager

E: Malformed line 89 in source list /etc/apt/sources.list (dist parse)
E: The list of sources could not be read.
Go to the repository dialog to correct the problem.
E: _cache->open() failed, please report.

sudo _cache->open() failed, please report
bash: syntax error near unexpected token `('

Things I have tried
Emacs /etc/apt/sources.list
  This opens the list in read only

85 ## respective vendors as a service to Ubuntu users.
86 # deb http://archive.canonical.com/ubuntu vivid partner
87 deb http://archive.canonical.com/ precise partner
88 # deb-src http://archive.canonical.com/ precise partner
89 deb http://archive.cononical.com/precise partner
90 # deb-src http://archive.cononical.com/precise partner
91 # deb-src http://archive.canonical.com/ precise partner
92 # deb-src http://archive.canonical.com/ubuntu vivid partner

Software Center does not respond, opens momentarily then closes.

Question information

Language:
Arabic (Algeria) Edit question
Status:
Solved
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Solved by:
Cliffm
Solved:
Last query:
Last reply:
Revision history for this message
actionparsnip (andrew-woodhead666) said :
#1

What is the output of:

cat /etc/issue

Thanks

Revision history for this message
Cliffm (c2mcatee) said :
#2

 cat /etc/issue
Ubuntu 15.04 \n \l

Revision history for this message
Manfred Hampl (m-hampl) said :
#3

You seem to have some errors in your sources.list configuration files (the configuration telling the package management system where to check for updates and download packages).

issue the command

sudo gedit /etc/apt/sources.list

This will ask for your password (as conformation for an administrative task) and should then open an edit with the sources.list configuration file loaded.

Scroll down to line 85 and change the lines 85 to 92 from their current values

85 ## respective vendors as a service to Ubuntu users.
86 # deb http://archive.canonical.com/ubuntu vivid partner
87 deb http://archive.canonical.com/ precise partner
88 # deb-src http://archive.canonical.com/ precise partner
89 deb http://archive.cononical.com/precise partner
90 # deb-src http://archive.cononical.com/precise partner
91 # deb-src http://archive.canonical.com/ precise partner
92 # deb-src http://archive.canonical.com/ubuntu vivid partner

into

## 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

save the file and close the editor.

The issue the command

sudo apt-get update

and copy/paste all output into this question document.

Revision history for this message
Cliffm (c2mcatee) said :
#4

cjm@cliffm:~$ sudo apt-get update
Ign http://extras.ubuntu.com vivid InRelease
Ign http://archive.canonical.com vivid InRelease
Ign http://extras.ubuntu.com vivid Release.gpg
Get:1 http://archive.canonical.com vivid Release.gpg [933 B]
Ign http://extras.ubuntu.com vivid Release
Ign http://security.ubuntu.com vivid-security InRelease
Get:2 http://archive.canonical.com vivid Release [9,356 B]
Get:3 http://security.ubuntu.com vivid-security Release.gpg [933 B]
Get:4 http://archive.canonical.com vivid/partner amd64 Packages [2,956 B]
Get:5 http://security.ubuntu.com vivid-security Release [63.5 kB]
Ign http://us.archive.ubuntu.com vivid InRelease
Get:6 http://archive.canonical.com vivid/partner i386 Packages [3,302 B]
Get:7 http://archive.canonical.com vivid/partner Translation-en [1,973 B]
Get:8 http://security.ubuntu.com vivid-security/main Sources [3,475 B]
Ign http://us.archive.ubuntu.com vivid-updates InRelease
Get:9 http://security.ubuntu.com vivid-security/restricted Sources [28 B]
Get:10 http://security.ubuntu.com vivid-security/universe Sources [28 B]
Get:11 http://security.ubuntu.com vivid-security/multiverse Sources [28 B]
Ign http://us.archive.ubuntu.com vivid-backports InRelease
Get:12 http://security.ubuntu.com vivid-security/main amd64 Packages [13.1 kB]
Get:13 http://security.ubuntu.com vivid-security/restricted amd64 Packages [28 B]
Get:14 http://security.ubuntu.com vivid-security/universe amd64 Packages [2,475 B]
Get:15 http://security.ubuntu.com vivid-security/multiverse amd64 Packages [28 B]
Hit http://us.archive.ubuntu.com vivid Release.gpg
Get:16 http://security.ubuntu.com vivid-security/main i386 Packages [13.1 kB]
Get:17 http://security.ubuntu.com vivid-security/restricted i386 Packages [28 B]
Get:18 http://security.ubuntu.com vivid-security/universe i386 Packages [2,467 B]
Get:19 http://us.archive.ubuntu.com vivid-updates Release.gpg [933 B]
Get:20 http://security.ubuntu.com vivid-security/multiverse i386 Packages [28 B]
Get:21 http://security.ubuntu.com vivid-security/main Translation-en [4,235 B]
Err http://extras.ubuntu.com vivid/main Sources
  404 Not Found
Hit http://security.ubuntu.com vivid-security/multiverse Translation-en
Hit http://us.archive.ubuntu.com vivid-backports Release.gpg
Err http://extras.ubuntu.com vivid/main amd64 Packages
  404 Not Found
Err http://extras.ubuntu.com vivid/main i386 Packages
  404 Not Found
Hit http://security.ubuntu.com vivid-security/restricted Translation-en
Ign http://extras.ubuntu.com vivid/main Translation-en_US
Ign http://extras.ubuntu.com vivid/main Translation-en
Hit http://us.archive.ubuntu.com vivid Release
Hit http://security.ubuntu.com vivid-security/universe Translation-en
Get:22 http://us.archive.ubuntu.com vivid-updates Release [63.5 kB]
Hit http://us.archive.ubuntu.com vivid-backports Release
Get:23 http://us.archive.ubuntu.com vivid/main Sources [1,077 kB]
Get:24 http://us.archive.ubuntu.com vivid/restricted Sources [7,162 B]
Get:25 http://us.archive.ubuntu.com vivid/universe Sources [7,017 kB]
Get:26 http://us.archive.ubuntu.com vivid/multiverse Sources [174 kB]
Get:27 http://us.archive.ubuntu.com vivid/main amd64 Packages [1,364 kB]
Get:28 http://us.archive.ubuntu.com vivid/restricted amd64 Packages [15.4 kB]
Get:29 http://us.archive.ubuntu.com vivid/universe amd64 Packages [6,485 kB]
Get:30 http://us.archive.ubuntu.com vivid/multiverse amd64 Packages [134 kB]
Get:31 http://us.archive.ubuntu.com vivid/main i386 Packages [1,361 kB]
Get:32 http://us.archive.ubuntu.com vivid/restricted i386 Packages [15.5 kB]
Get:33 http://us.archive.ubuntu.com vivid/universe i386 Packages [6,486 kB]
Get:34 http://us.archive.ubuntu.com vivid/multiverse i386 Packages [134 kB]
Get:35 http://us.archive.ubuntu.com vivid-updates/main Sources [4,771 B]
Get:36 http://us.archive.ubuntu.com vivid-updates/restricted Sources [28 B]
Get:37 http://us.archive.ubuntu.com vivid-updates/universe Sources [28 B]
Get:38 http://us.archive.ubuntu.com vivid-updates/multiverse Sources [28 B]
Get:39 http://us.archive.ubuntu.com vivid-updates/main amd64 Packages [17.2 kB]
Get:40 http://us.archive.ubuntu.com vivid-updates/restricted amd64 Packages [28 B]
Get:41 http://us.archive.ubuntu.com vivid-updates/universe amd64 Packages [3,002 B]
Get:42 http://us.archive.ubuntu.com vivid-updates/multiverse amd64 Packages [28 B]
Get:43 http://us.archive.ubuntu.com vivid-updates/main i386 Packages [17.2 kB]
Get:44 http://us.archive.ubuntu.com vivid-updates/restricted i386 Packages [28 B]
Get:45 http://us.archive.ubuntu.com vivid-updates/universe i386 Packages [3,014 B]
Get:46 http://us.archive.ubuntu.com vivid-updates/multiverse i386 Packages [28 B]
Get:47 http://us.archive.ubuntu.com vivid-updates/main Translation-en [6,743 B]
Hit http://us.archive.ubuntu.com vivid-updates/multiverse Translation-en
Hit http://us.archive.ubuntu.com vivid-updates/restricted Translation-en
Hit http://us.archive.ubuntu.com vivid-backports/main Sources
Hit http://us.archive.ubuntu.com vivid-backports/restricted Sources
Hit http://us.archive.ubuntu.com vivid-backports/universe Sources
Hit http://us.archive.ubuntu.com vivid-backports/multiverse Sources
Hit http://us.archive.ubuntu.com vivid-backports/main amd64 Packages
Hit http://us.archive.ubuntu.com vivid-backports/restricted amd64 Packages
Hit http://us.archive.ubuntu.com vivid-backports/universe amd64 Packages
Hit http://us.archive.ubuntu.com vivid-backports/multiverse amd64 Packages
Hit http://us.archive.ubuntu.com vivid-backports/main i386 Packages
Hit http://us.archive.ubuntu.com vivid-backports/restricted i386 Packages
Hit http://us.archive.ubuntu.com vivid-backports/universe i386 Packages
Hit http://us.archive.ubuntu.com vivid-backports/multiverse i386 Packages
Hit http://us.archive.ubuntu.com vivid-backports/main Translation-en
Hit http://us.archive.ubuntu.com vivid-backports/multiverse Translation-en
Hit http://us.archive.ubuntu.com vivid-backports/restricted Translation-en
Hit http://us.archive.ubuntu.com vivid-backports/universe Translation-en
Hit http://us.archive.ubuntu.com vivid/main Translation-en
Hit http://us.archive.ubuntu.com vivid/multiverse Translation-en
Hit http://us.archive.ubuntu.com vivid/restricted Translation-en
Hit http://us.archive.ubuntu.com vivid/universe Translation-en
Hit http://us.archive.ubuntu.com vivid-updates/universe Translation-en
Fetched 24.5 MB in 38s (643 kB/s)
W: Failed to fetch http://extras.ubuntu.com/ubuntu/dists/vivid/main/source/Sources 404 Not Found

W: Failed to fetch http://extras.ubuntu.com/ubuntu/dists/vivid/main/binary-amd64/Packages 404 Not Found

W: Failed to fetch http://extras.ubuntu.com/ubuntu/dists/vivid/main/binary-i386/Packages 404 Not Found

E: Some index files failed to download. They have been ignored, or old ones used instead.

Revision history for this message
Manfred Hampl (m-hampl) said :
#5

Ok, the problem with the partner repository seems solved, now there is just the extras repository left to remove (related to bug #1409555 ).

What is the output of

grep extras /etc/apt/sources.list /etc/apt/sources.list.d/*.list

Revision history for this message
Cliffm (c2mcatee) said :
#6

grep extras /etc/apt/sources.list /etc/apt/sources.list.d/*.list
/etc/apt/sources.list:deb http://extras.ubuntu.com/ubuntu vivid main
/etc/apt/sources.list:deb-src http://extras.ubuntu.com/ubuntu vivid main
grep: /etc/apt/sources.list.d/*.list: No such file or directory

Revision history for this message
Manfred Hampl (m-hampl) said :
#7

ok. Do the following:

issue the command

sudo gedit /etc/apt/sources.list

search for the two lines that contain extras.ubuntu.com (sorry, I can't tell which lines these are)

put a hash sign # to the beginning of the lines that they look

# deb http://extras.ubuntu.com/ubuntu vivid main
# deb-src http://extras.ubuntu.com/ubuntu vivid main

save the file and close the editor.

Try the command

sudo apt-get update

and hopefully there will no more be warning or errors shown.

Revision history for this message
Cliffm (c2mcatee) said :
#8

This seems to have solved this problem. Now on to the next one no restart from sleep.