I would try to add an entry in my sources.list file (https://wiki.debian.org/SourcesList). This tells apt-get where to get it's package list from.
Can't find emacs package on Debian
Pergunta
I need help to install emacs on my Debian 7.2 system. I have looked at many other forms and cannot get emacs to install.
I have tried running "sudo apt-get install emacs", "sudo apt-get install emacs23", any other way to type emacs.
I have also tried which returns a couple 404 errors.
sudo apt-get update
W: Failed to fetch http://ppa.launchpad.net/cassou/emacs/ubuntu/dists/wheezy/main/binary-i386/Packages 404 Not Found
E: Some index files failed to download. They have been ignored, or old ones used instead.
jon@debian:~$ apt-cache policy
Package files:
100 /var/lib/dpkg/status
release a=now
500 http://emacs.naquadah.org/ stable/ Packages
release o=jd,a=stable,n=stable,l=jd,c=
origin emacs.naquadah.org
500 http://security.ubuntu.com/ubuntu/ precise-security/main Translation-en
500 http://security.ubuntu.com/ubuntu/ precise-security/main i386 Packages
release v=12.04,o=Ubuntu,a=precise-security,n=precise,l=Ubuntu,c=main
origin security.ubuntu.com
Pinned packages:
jon@debian:~$ apt-cache policy emacs
emacs:
Installed: (none)
Candidate: 23.3+1-1ubuntu9.1
Version table:
23.3+1-1ubuntu9.1 0
500 http://security.ubuntu.com/ubuntu/ precise-security/main i386 Packages
What commands do I need to run or what files should I remove or modify?
Solução 4
Outras dicas
It looks like you followed some instructions meant for Ubuntu, not Debian, to allow you to install development snapshots of Emacs. apt-get therefore adds in (the Debian-specific) dists/wheezy
, but that makes a URL that doesn't exist.
First, remove the PPA:
sudo add-apt-repository -r ppa:cassou/emacs
Next, you have a few choices. If you just want the stable (but fairly old) Emacs 23, you should now be able to simply apt-get install emacs
. If you'd rather have bleeding-edge snapshots, you can follow the instructions at http://emacs.naquadah.org/ for stable:
- Run
wget -q -O - http://emacs.naquadah.org/key.gpg | sudo apt-key add -
Add these to /etc/apt/sources.list:
deb http://emacs.naquadah.org/ stable/ deb-src http://emacs.naquadah.org/ stable/
Run
sudo apt-get update
.- Run
sudo apt-get install emacs-snapshot
(substituting whichever more specific Emacs package as desired).
Something is wrong with your system and / or state files.
I always install emacs, and eg on this Debian testing box have
edd@billie:~$ apt-cache policy emacs23
emacs23:
Installed: (none)
Candidate: 23.4+1-4.1
Version table:
23.4+1-4.1 0
500 http://ftp.us.debian.org/debian/ testing/main i386 Packages
edd@billie:~$
This shows a) that the package is installed, b) what the candidate version is, c) that the installed version is the same (ie I am current)) and d) where it all came from.
Unfortunately emacs-snapshot is no longer maintained as of 11 Jan 2014. If you want a newer emacs than that provided by the "official" package=emacs (which IIRC is version=23), try package=emacs24 from testing or sid. I use LMDE UP8 (currently here), so have
$ apt-cache policy emacs24
emacs24:
Installed: 24.3+1-2
Candidate: 24.3+1-2
Version table:
*** 24.3+1-2 0
500 http://mirrors.xmission.com/linuxmint-debian/latest/ testing/main amd64 Packages
100 /var/lib/dpkg/status
$ lsalh /etc/apt/
-rw-r--r-- 1 root root 35 Feb 27 11:46 apt.conf
drwxr-xr-x 2 root root 4.0K Mar 21 21:55 apt.conf.d
-rw-r--r-- 1 root root 2.1K May 5 2013 apt-file.conf
drwxr-xr-x 2 root root 4.0K Feb 27 12:58 preferences.d
-rw-r--r-- 1 root root 23 Feb 27 12:59 sources.list
drwxr-xr-x 2 root root 4.0K Mar 28 19:47 sources.list.d
-rw-r--r-- 1 root root 17K Mar 28 19:47 trusted.gpg
-rw-r--r-- 1 root root 15K Feb 27 12:53 trusted.gpg~
drwxr-xr-x 2 root root 4.0K Mar 28 19:47 trusted.gpg.d
$ cat /etc/apt/sources.list
#/etc/apt/sources.list
$ lsalh /etc/apt/sources.list.d/
...
-rw-r--r-- 1 root root 176 Mar 28 19:47 google-chrome.list
-rw-r--r-- 1 root root 387 Mar 21 21:52 official-package-repositories.list
$ cat /etc/apt/sources.list.d/official-package-repositories.list
deb http://packages.linuxmint.com debian main upstream import
deb http://mirrors.xmission.com/linuxmint-debian/latest/ testing main contrib non-free
deb http://mirrors.xmission.com/linuxmint-debian/latest/security testing/updates main contrib non-free
deb http://mirrors.xmission.com/linuxmint-debian/latest/multimedia testing main non-free
deb http://extra.linuxmint.com debian main
but you can get the same package from official repos.