Thanks for the reply, As it happens over the last 24hr i have tracked down why this was not working.
I tested the same c ommand on Suse, Debian 6 and fedora, and it worked fine on all of them which i found a bit strange, however once i updated Ubuntu 10.04 it worked. so i checked what the last updated had supplied, and it seems the recent OpenSSL update has resolved this issue.
To confirm this, once back in the office i installed the same open SSL update, and it all worked fine.
As a final check i tried this on a fresh Ubuntu 10.04.1 install, it failes, run updates it works..
to be very specific. the pk12 command
pk12util -d /home/df001/.mozilla/firefox/qe5y5lht.tc.default/ -i client.p12
works
You can use this trick. Open a terminal ( Pressing Ctrl+Alt+T ) and do these
Move the corrupted one to the safe place
sudo mv /etc/apt/sources.list ~/
and recreate it
sudo touch /etc/apt/sources.list
Open Software & Updates
software-properties-gtk
This will open software-properties-gtk
with no repository selected.
Then, change the server to Main server or to any other server of your choice. You must enable some repositories from the new window in order to create a new sources.list
file in /etc/apt/
.
After enabling some sources from Ubuntu software tab, you can enable updates. To do so, switch to Updates tab and select one or more updates channel. I recommend selecting the security and updates channels at least. (This image is later added from Ubuntu xenial, so there can be some differences)
Updated with inline content
This is the sources.list
file for 12.04 Precise Pangolin.
###### Ubuntu Main Repos
deb http://archive.ubuntu.com/ubuntu/ precise main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ precise main restricted universe multiverse
###### Ubuntu Update Repos
deb http://archive.ubuntu.com/ubuntu/ precise-security main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ precise-updates main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ precise-proposed main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ precise-backports main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ precise-security main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ precise-updates main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ precise-proposed main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ precise-backports main restricted universe multiverse
###### Ubuntu Partner Repo
deb http://archive.canonical.com/ubuntu precise partner
deb-src http://archive.canonical.com/ubuntu precise partner
###### Ubuntu Extras Repo
deb http://extras.ubuntu.com/ubuntu precise main
deb-src http://extras.ubuntu.com/ubuntu precise main
If you're using another release, you need to replace the precise
word with your Ubuntu release name. You can see which name you should use with this command:
lsb_release -c -s
To replace the word, you can use this sed
command (assuming you copied the sources content in /etc/apt/sources.list
):
sudo sed -i "s/precise/$(lsb_release -c -s)/" /etc/apt/sources.list
Note 1: the word deb
and deb-src
refers to the repository format. deb
is for binary packages and deb-src
is for source packages.
Note 2: Using #
at the start of the line makes that line a comment. apt
will ignore it, so any repositories mentioned on that line will be disabled.
Note 3: There are repository lines which includes all four components: main
, universe
, restricted
, multiverse
. You can disable one or more of them by removing the word.
Note 4: You can find some explanation of the repositories in this my other answer
Best Answer
I'm not sure what you want, but:
<cctld>.archive.ubuntu.com
, where the two character short code is the Country Code Top Level Domain. You can find additional mirrors with their status at Launchpad.lsb_release -sc
to find that out, and it's the first word of the release pretty name in lowercase (trusty
for Trusty Tahr, for example).<codename>
,<codename>-security
,<codename>-updates
,<codename>-backports
and<codename>-proposed
. The first is necessary as it is the base, the second is highly recommended as it contains security fixes, the fourth only if you need some package backported from a newer release and the fifth only if a developer asks you to enable it for testing a possible fix.main
,multiverse
,universe
andrestricted
(What's the difference between multiverse, universe, restricted and main?)So you can always create a safe
sources.list
which contains just:If you want a command to do this:
Or,
lsb_release
isn't available, use/etc/os-release
from thebase-files
package:In addition to the Launchpad list, the list provided by the Software Sources program is from
/usr/share/python-apt/templates/Ubuntu.mirrors
, which is from thepython-apt-common
package. This package is only an indirect Suggests dependency ofapt
, so it may not be installed by default on a server.