magnars / dash.el

A modern list library for Emacs
GNU General Public License v3.0
1.67k stars 137 forks source link

File error: https://melpa.org/packages/dash-20201223.1755.tar, Not found. #360

Closed hongyi-zhao closed 3 years ago

hongyi-zhao commented 3 years ago

On Ubuntu 20.10, I try to install dash.el package with the following command:

M-x package-install dash

But emcas throws out the following error:

File error: https://melpa.org/packages/dash-20201223.1755.tar, Not found.

Best, HY

basil-conto commented 3 years ago

What is your M-x version RET and value of package-archives?

File error: https://melpa.org/packages/dash-20201223.1755.tar, Not found.

That looks like an old version of Dash. Have you tried running M-x package-refresh-contents RET before package-install?

Can you reproduce this error starting from emacs -Q?

I can't reproduce the error on any of Emacs 26, 27, or 28 (I would try 24 and 25 as well, but they can't currently install anything from MELPA, probably due to a recent SSL configuration change).

Here's what I tried for each of the aforementioned Emacs versions:

  1. HOME="$(mktemp -d)" emacs -Q
  2. (progn
     (setq debug-on-error t)
     (require 'package)
     (push '("melpa" . "https://melpa.org/packages/") package-archives)
     (package-initialize)
     (package-refresh-contents)
     (package-install 'dash))
  3. C-j

All of them succeeded in installing dash-20210104.2053.

Here's my Emacs version info, as collected by M-x report-emacs-bug RET:

In GNU Emacs 26.3 (build 1, x86_64-pc-linux-gnu, X toolkit, Xaw3d scroll bars)
 of 2021-01-02 built on tia
Windowing system distributor 'The X.Org Foundation', version 11.0.12010000
System Description: Debian GNU/Linux bullseye/sid

Recent messages:
For information about GNU Emacs and the GNU system, type C-h C-a.
Quit
Configured using:
 'configure 'CFLAGS=-O2 -march=native' --prefix=/home/blc/.local
 --program-suffix=-26 --with-x-toolkit=lucid
 --with-file-notification=yes --with-x --with-modules'

Configured features:
XAW3D XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND GPM DBUS GSETTINGS
GLIB NOTIFY ACL LIBSELINUX GNUTLS LIBXML2 FREETYPE M17N_FLT LIBOTF XFT
ZLIB TOOLKIT_SCROLL_BARS LUCID X11 XDBE XIM MODULES THREADS LIBSYSTEMD
LCMS2

Important settings:
  value of $LANG: en_IE.UTF-8
  value of $XMODIFIERS: @im=ibus
  locale-coding-system: utf-8-unix
In GNU Emacs 27.1.90 (build 1, x86_64-pc-linux-gnu, X toolkit, cairo version 1.16.0, Xaw3d scroll bars)
 of 2021-01-02 built on tia
Repository revision: a7c2793efe503ad7ad9f2d6fc73555da3a4cdaea
Repository branch: emacs-27
Windowing system distributor 'The X.Org Foundation', version 11.0.12010000
System Description: Debian GNU/Linux bullseye/sid

Recent messages:
For information about GNU Emacs and the GNU system, type C-h C-a.

Configured using:
 'configure 'CC=ccache gcc' 'CFLAGS=-O0 -g3 -ggdb -gdwarf-4'
 --config-cache --prefix=/home/blc/.local --program-suffix=-27
 --enable-checking=yes,glyphs --enable-check-lisp-object-type
 --with-x-toolkit=lucid --with-file-notification=yes --with-x
 --with-cairo'

Configured features:
XAW3D XPM JPEG TIFF GIF PNG RSVG CAIRO SOUND GPM DBUS GSETTINGS GLIB
NOTIFY INOTIFY ACL LIBSELINUX GNUTLS LIBXML2 FREETYPE HARFBUZZ M17N_FLT
LIBOTF ZLIB TOOLKIT_SCROLL_BARS LUCID X11 XDBE XIM MODULES THREADS
LIBSYSTEMD JSON PDUMPER LCMS2 GMP

Important settings:
  value of $LANG: en_IE.UTF-8
  value of $XMODIFIERS: @im=ibus
  locale-coding-system: utf-8-unix
In GNU Emacs 28.0.50 (build 1, x86_64-pc-linux-gnu, X toolkit, cairo version 1.16.0, Xaw3d scroll bars)
 of 2021-01-04 built on tia
Repository revision: 57e872ac757d7a003f4a7f132a08798c3a1a6e97
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.12010000
System Description: Debian GNU/Linux bullseye/sid

Configured using:
 'configure 'CC=ccache gcc' 'CFLAGS=-O2 -march=native' --config-cache
 --prefix=/home/blc/.local --enable-checking=structs
 --with-x-toolkit=lucid --with-file-notification=yes --with-x'

Configured features:
XAW3D XPM JPEG TIFF GIF PNG RSVG CAIRO SOUND GPM DBUS GSETTINGS GLIB
NOTIFY INOTIFY ACL LIBSELINUX GNUTLS LIBXML2 FREETYPE HARFBUZZ M17N_FLT
LIBOTF ZLIB TOOLKIT_SCROLL_BARS LUCID X11 XDBE XIM MODULES THREADS
LIBSYSTEMD JSON PDUMPER LCMS2

Important settings:
  value of $LANG: en_IE.UTF-8
  value of $XMODIFIERS: @im=ibus
  locale-coding-system: utf-8-unix
hongyi-zhao commented 3 years ago

What is your M-x version RET and value of package-archives?

I don't know how to inspect the value of package-archives. I only see the following after issued the command M-x version RET:

Warning (initialization): An error occurred while loading ‘/home/werner/.emacs.d/init.el’:

File error: https://melpa.org/packages/dash-20201223.1755.tar, Not found

To ensure normal operation, you should investigate and remove the
cause of the error in your initialization file.  Start Emacs with
the ‘--debug-init’ option to view a complete error backtrace. Disable showing Disable logging

File error: https://melpa.org/packages/dash-20201223.1755.tar, Not found.

That looks like an old version of Dash. Have you tried running M-x package-refresh-contents RET before package-install?

The following steps can trigger the installation of the latest dash on melpa repo:

$ rm -fr ~/.emacs.d/elpa/archives $ rm -fr ~/.emacs.d/elpa/dash-*

Then M-x package-refresh-contents RET followed by package-install dash?

The dash package exists both in the following two repos and the one in melpa has the latest version:

werner@X10DAi:~/.emacs.d/elpa/archives$ egrep -lnR 'dash' .
./gnu/archive-contents
./melpa/archive-contents

I am not sure if this is the cause of this problem.

Can you reproduce this error starting from emacs -Q?

This package can be installed successfully with emacs -Q.

I can't reproduce the error on any of Emacs 26, 27, or 28 (I would try 24 and 25 as well, but they can't currently install anything from MELPA, probably due to a recent SSL configuration change).

Here's what I tried for each of the aforementioned Emacs versions:

1. `HOME="$(mktemp -d)" emacs -Q`

2. ```emacs-lisp
   (progn
     (setq debug-on-error t)
     (require 'package)
     (push '("melpa" . "https://melpa.org/packages/") package-archives)
     (package-initialize)
     (package-refresh-contents)
     (package-install 'dash))
   ```

3. `C-j`

All of them succeeded in installing dash-20210104.2053.

This method also works for me, see the following for more info:

Note: I use a local http proxy due to the direct access to melpa is very slow from my location.

(setq url-proxy-services
   '(("no_proxy" . "^\\(localhost\\|10\\..*\\|192\\.168\\..*\\|127\\..*\\|172\\.17\\..*\\)")
     ("http" . "127.0.0.1:8080")
     ("https" . "127.0.0.1:8080")))
(progn
  (setq debug-on-error t)
  (require 'package)
  (push '("melpa" . "https://melpa.org/packages/") package-archives)
  (package-initialize)
  (package-refresh-contents)
  (package-install 'dash))
"Package ‘dash’ installed."

Here's my Emacs version info, as collected by M-x report-emacs-bug RET:

See mine below:

In GNU Emacs 28.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.23, cairo version 1.16.0)
 of 2021-01-04 built on X10DAi
Repository revision: 90951f847c04d288121d5cb3b2e03639f060125c
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.12009000
System Description: Ubuntu 20.10

Configured using:
 'configure --without-m17n-flt'

Configured features:
XPM JPEG TIFF GIF PNG RSVG CAIRO SOUND GPM DBUS GSETTINGS GLIB NOTIFY
INOTIFY ACL LIBSELINUX GNUTLS LIBXML2 FREETYPE HARFBUZZ LIBOTF ZLIB
TOOLKIT_SCROLL_BARS GTK3 X11 XDBE XIM MODULES THREADS LIBSYSTEMD PDUMPER
LCMS2

Important settings:
  value of $LANG: en_US.UTF-8
  value of $XMODIFIERS: @im=fcitx
  locale-coding-system: utf-8-unix

Major mode: Lisp Interaction

Minor modes in effect:
  shell-dirtrack-mode: t
  tooltip-mode: t
  global-eldoc-mode: t
  eldoc-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: (only . t)

Load-path shadows:
None found.

Features:
(shadow sort mail-extr emacsbug sendmail shell pcomplete compile comint
ansi-color ring info easy-mmode autoload radix-tree lisp-mnt tar-mode
arc-mode archive-mode cus-edit pp cus-start cus-load wid-edit mm-archive
message dired dired-loaddefs rfc822 mml mml-sec epa derived gnus-util
rmail rmail-loaddefs text-property-search time-date mailabbrev gmm-utils
mailheader mm-decode mm-bodies mm-encode mail-utils gnutls
network-stream url-http mail-parse rfc2231 rfc2047 rfc2045 mm-util
ietf-drums mail-prsvr url-gw nsm rmc puny url-cache url-auth epg
epg-config finder-inf package easymenu browse-url url url-proxy
url-privacy url-expand url-methods url-history url-cookie url-domsuf
url-util mailcap url-handlers url-parse auth-source cl-seq eieio
eieio-core cl-macs eieio-loaddefs password-cache json subr-x map
url-vars seq byte-opt gv bytecomp byte-compile cconv cl-loaddefs cl-lib
iso-transl tooltip eldoc electric uniquify ediff-hook vc-hooks
lisp-float-type mwheel term/x-win x-win term/common-win x-dnd tool-bar
dnd fontset image regexp-opt fringe tabulated-list replace newcomment
text-mode elisp-mode lisp-mode prog-mode register page tab-bar menu-bar
rfn-eshadow isearch timer select scroll-bar mouse jit-lock font-lock
syntax facemenu font-core term/tty-colors frame minibuffer cl-generic
cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao
korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech
european ethiopic indian cyrillic chinese composite charscript charprop
case-table epa-hook jka-cmpr-hook help simple abbrev obarray
cl-preloaded nadvice button loaddefs faces cus-face macroexp files
window text-properties overlay sha1 md5 base64 format env code-pages
mule custom widget hashtable-print-readable backquote threads dbusbind
inotify lcms2 dynamic-setting system-font-setting font-render-setting
cairo move-toolbar gtk x-toolkit x multi-tty make-network-process emacs)

Memory information:
((conses 16 246394 18423)
 (symbols 48 16451 2)
 (strings 32 82148 1831)
 (string-bytes 1 2055722)
 (vectors 16 23350)
 (vector-slots 8 312841 18544)
 (floats 8 35 426)
 (intervals 56 371 0)
 (buffers 984 13))
basil-conto commented 3 years ago

I don't know how to inspect the value of package-archives.

C-h v package-archives RET

I only see the following after issued the command M-x version RET

What you quoted in your message is not the output of the version command.

The dash package exists both in the following two repos and the one in melpa has the latest version:

The version of Dash on GNU ELPA (aka "gnu") is unfortunately very old and stale (I'm working on updating it in #344), so I recommend you use the version from MELPA instead. Unless you have customised package-archive-priorities or package-pinned-packages, then the version from MELPA should be installed by default, since its version number is greater than that on GNU ELPA.

I am not sure if this is the cause of this problem.

I don't think so.

This package can be installed successfully with emacs -Q.

That means something in your configuration is causing the issue.

This method also works for me, see the following for more info:

Then if possible, I would recommend deleting and reinstalling all your Emacs packages, just to make sure they're all fresh and up to date. Otherwise, try uninstalling/deleting and then reinstalling only Dash. Either way, this sounds like it's just a matter of getting a fresh copy of the package archive, and not an issue with Dash.

hongyi-zhao commented 3 years ago

C-h v package-archives RET

package-archives is a variable defined in ‘package.el’.
Its value is
(("gnu" . "https://elpa.gnu.org/packages/")
("nongnu" . "https://elpa.nongnu.org/nongnu/")
("melpa" . "https://melpa.org/packages/")
("org" . "https://orgmode.org/elpa/"))
Original value was 
(("gnu" . "https://elpa.gnu.org/packages/")
("nongnu" . "https://elpa.nongnu.org/nongnu/"))

The version of Dash on GNU ELPA (aka "gnu") is unfortunately very old and stale (I'm working on updating it in #344), so I recommend you use the version from MELPA instead. Unless you have customised package-archive-priorities or package-pinned-packages, then the version from MELPA should be installed by default, since its version number is greater than that on GNU ELPA.

Thanks for letting me know this. It should be something in my init.el screwed by me caused the problem. Anyway, it works now and the following version of dash will be automatically installed on my box:

dash-20210105.224

See the following code snippets for the installation of some needed packages in my init.el borrowed from the prelude project:

;https://github.com/bbatsov/prelude/blob/aaedc8537c04e4af7a53690b8bbb8522d5a35b9d/core/prelude-packages.el#L56
(defvar prelude-packages
  ;; https://github.com/magnars/s.el#installation
  '(dash
    s
    valign
    flycheck)
  "A list of packages to ensure are installed at launch.")

(defun prelude-packages-installed-p ()
  "Check if all packages in `prelude-packages' are installed."
  (cl-every #'package-installed-p prelude-packages))

(defun prelude-require-package (package)
  "Install PACKAGE unless already installed."
  (unless (memq package prelude-packages)
    (add-to-list 'prelude-packages package))
  (unless (package-installed-p package)
    (package-install package)))

(defun prelude-require-packages (packages)
  "Ensure PACKAGES are installed.
Missing packages are installed automatically."
  (mapc #'prelude-require-package packages))

(defun prelude-install-packages ()
  "Install all packages listed in `prelude-packages'."
  (unless (prelude-packages-installed-p)
    ;; check for new packages (package versions)
    (message "%s" "Emacs Prelude is now refreshing its package database...")
    (package-refresh-contents)
    (message "%s" " done.")
    ;; install the missing packages
    (prelude-require-packages prelude-packages)))

;; run package installation
(prelude-install-packages)
basil-conto commented 3 years ago

It should be something in my init.el screwed by me caused the problem. Anyway, it works now

Thanks for reporting back, I'm glad it's working again. Does that mean this issue can be closed?