Diễn Đàn Clicking Here!

Ad 468 X 60

Thứ Sáu, 6 tháng 3, 2015

Widgets

fix lỗi apt-get install trên ubuntu

vào một ngày đẹp trời bạn tư dưng không dùng apt-get install trên ubuntu được nữa. kiểm tra thì không phải là do DNS.Nguyên nhân là do các link trong file sources.list không tồn tại nữa.

Hướng giả quyết.
đầu tiên bạn xóa hết text trong /etc/apt/sources.list
#vi /etc/apt/sources.list
sau đó dán đoạn text dưới đây vào.
# deb cdrom:[Xubuntu 12.04 LTS _Precise Pangolin_ - Release amd64 (20120425)]/ dists/precise/main/binary-i386/ # deb cdrom:[Xubuntu 12.04 LTS _Precise Pangolin_ - Release amd64 (20120425)]/ dists/precise/multiverse/binary-i386/# deb cdrom:[Xubuntu 12.04 LTS _Precise Pangolin_ - Release amd64 (20120425)]/ dists/precise/restricted/binary-i386/# deb cdrom:[Xubuntu 12.04 LTS _Precise Pangolin_ - Release amd64 (20120425)]/ dists/precise/universe/binary-i386/# deb cdrom:[Xubuntu 12.04 LTS _Precise Pangolin_ - Release amd64 (20120425)]/ precise main multiverse restricted universe # See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to# newer versions of the distribution.deb http://nl.archive.ubuntu.com/ubuntu/ precise main restricteddeb-src http://nl.archive.ubuntu.com/ubuntu/ precise main restricted ## Major bug fix updates produced after the final release of the## distribution.deb http://nl.archive.ubuntu.com/ubuntu/ precise-updates main restricteddeb-src http://nl.archive.ubuntu.com/ubuntu/ precise-updates main restricted ## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu## team. Also, please note that software in universe WILL NOT receive any## review or updates from the Ubuntu security team.deb http://nl.archive.ubuntu.com/ubuntu/ precise universedeb-src http://nl.archive.ubuntu.com/ubuntu/ precise universedeb http://nl.archive.ubuntu.com/ubuntu/ precise-updates universedeb-src http://nl.archive.ubuntu.com/ubuntu/ precise-updates universe ## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team, and may not be under a free licence. Please satisfy yourself as to
## your rights to use the software. Also, please note that software in
## multiverse WILL NOT receive any review or updates from the Ubuntu## security team.deb http://nl.archive.ubuntu.com/ubuntu/ precise multiversedeb-src http://nl.archive.ubuntu.com/ubuntu/ precise multiversedeb http://nl.archive.ubuntu.com/ubuntu/ precise-updates multiversedeb-src http://nl.archive.ubuntu.com/ubuntu/ precise-updates multiverse ## N.B. software from this repository may not have been tested as## extensively as that contained in the main release, although it includes## newer versions of some applications which may provide useful features.## Also, please note that software in backports WILL NOT receive any review## or updates from the Ubuntu security team.deb http://nl.archive.ubuntu.com/ubuntu/ precise-backports main restricted universe multiversedeb-src http://nl.archive.ubuntu.com/ubuntu/ precise-backports main restricted universe multiverse deb http://security.ubuntu.com/ubuntu precise-security main restricteddeb-src http://security.ubuntu.com/ubuntu precise-security main restricteddeb http://security.ubuntu.com/ubuntu precise-security universedeb-src http://security.ubuntu.com/ubuntu precise-security universedeb http://security.ubuntu.com/ubuntu precise-security multiversedeb-src http://security.ubuntu.com/ubuntu precise-security multiverse ## Uncomment the following two lines to add software from Canonical's## 'partner' repository.## This software is not part of Ubuntu, but is offered by Canonical and the## respective vendors as a service to Ubuntu users.deb http://archive.canonical.com/ubuntu precise partner# deb-src http://archive.canonical.com/ubuntu precise partner ## This software is not part of Ubuntu, but is offered by third-party## developers who want to ship their latest software.deb http://extras.ubuntu.com/ubuntu precise maindeb-src http://extras.ubuntu.com/ubuntu precise maindeb http://cran.at.r-project.org/bin/linux/ubuntu precise/# deb-src http://cran.at.r-project.org/bin/linux/ubuntu precise/# deb http://archive.canonical.com/ precise partner# deb-src http://archive.canonical.com/ precise partner

tiếp theo là gõ các lênh sau đây vào.

#sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 437D05B5 3E5C1192
#gpg --keyserver keyserver.ubuntu.com --recv-key E084DAB9
#gpg -a --export E084DAB9 | sudo apt-key add -


Chúc các bạn thành công.

SHARE THIS POST   

  • Facebook
  • Twitter
  • Myspace
  • Google Buzz
  • Reddit
  • Stumnleupon
  • Delicious
  • Digg

0 nhận xét: