radian-software / straight.el

🍀 Next-generation, purely functional package manager for the Emacs hacker.
MIT License
2.72k stars 150 forks source link

Failed bootstrap when using proxychains-ng (Ubuntu 20.04). #786

Closed hongyi-zhao closed 3 years ago

hongyi-zhao commented 3 years ago

On Ubuntu 20.04, I'm using the git master version of Emacs compiled by me. Now, I try to use straight.el and use-package at the same time. According to the instruction here, I place the following bootstrap code in my ~/.emacs.d/init.el:

(setq package-enable-at-startup nil)
(defvar bootstrap-version)
(let ((bootstrap-file
       (expand-file-name "straight/repos/straight.el/bootstrap.el" user-emacs-directory))
      (bootstrap-version 5))
  (unless (file-exists-p bootstrap-file)
    (with-current-buffer
        (url-retrieve-synchronously
         "https://raw.githubusercontent.com/raxod502/straight.el/develop/install.el"
         'silent 'inhibit-cookies)
      (goto-char (point-max))
      (eval-print-last-sexp)))
  (load bootstrap-file nil 'nomessage))

When I try to start Emacs, I meet the following errors:

Debugger entered--Lisp error: (error "straight.el bootstrap failed: \nDebugger entered--L...")
  signal(error ("straight.el bootstrap failed: \nDebugger entered--L..."))
  error("straight.el bootstrap failed: %s" "\nDebugger entered--Lisp error: (error \"Failed to r...")
  (if (= 0 (call-process (let ((emacs-binary-path (expand-file-name invocation-name invocation-directory)) (runemacs-binary-path (if (straight--windows-os-p) (progn ...)))) (if (and runemacs-binary-path (file-exists-p runemacs-binary-path)) runemacs-binary-path emacs-binary-path)) nil '(t t) nil "--batch" "--no-window-system" "--quick" "--load" temp-file)) nil (error "straight.el bootstrap failed: %s" (buffer-string)))
  (progn (if (= 0 (call-process (let ((emacs-binary-path (expand-file-name invocation-name invocation-directory)) (runemacs-binary-path (if ... ...))) (if (and runemacs-binary-path (file-exists-p runemacs-binary-path)) runemacs-binary-path emacs-binary-path)) nil '(t t) nil "--batch" "--no-window-system" "--quick" "--load" temp-file)) nil (error "straight.el bootstrap failed: %s" (buffer-string))))
  (unwind-protect (progn (if (= 0 (call-process (let ((emacs-binary-path ...) (runemacs-binary-path ...)) (if (and runemacs-binary-path ...) runemacs-binary-path emacs-binary-path)) nil '(t t) nil "--batch" "--no-window-system" "--quick" "--load" temp-file)) nil (error "straight.el bootstrap failed: %s" (buffer-string)))) (and (buffer-name temp-buffer) (kill-buffer temp-buffer)))
  (save-current-buffer (set-buffer temp-buffer) (unwind-protect (progn (if (= 0 (call-process (let (... ...) (if ... runemacs-binary-path emacs-binary-path)) nil '(t t) nil "--batch" "--no-window-system" "--quick" "--load" temp-file)) nil (error "straight.el bootstrap failed: %s" (buffer-string)))) (and (buffer-name temp-buffer) (kill-buffer temp-buffer))))
  (let ((temp-buffer (generate-new-buffer " *temp*" t))) (save-current-buffer (set-buffer temp-buffer) (unwind-protect (progn (if (= 0 (call-process (let ... ...) nil '... nil "--batch" "--no-window-system" "--quick" "--load" temp-file)) nil (error "straight.el bootstrap failed: %s" (buffer-string)))) (and (buffer-name temp-buffer) (kill-buffer temp-buffer)))))
  (let ((temp-file (make-temp-file "straight.el~"))) (write-region nil nil temp-file nil 'silent) (let ((temp-buffer (generate-new-buffer " *temp*" t))) (save-current-buffer (set-buffer temp-buffer) (unwind-protect (progn (if (= 0 (call-process ... nil ... nil "--batch" "--no-window-system" "--quick" "--load" temp-file)) nil (error "straight.el bootstrap failed: %s" (buffer-string)))) (and (buffer-name temp-buffer) (kill-buffer temp-buffer))))))
  (save-current-buffer (set-buffer (url-retrieve-synchronously (format (concat "https://raw.githubusercontent.com/" "raxod502/straight.el/install/%s/straight.el") (substring (symbol-name version) 1)) 'silent 'inhibit-cookies)) (if (equal url-http-response-status 200) nil (error "Unknown recipe version: %S" version)) (delete-region (point-min) url-http-end-of-headers) (goto-char (point-min)) (princ ";; -*- coding: utf-8 -*-" (current-buffer)) (print (cons 'progn (let* ((vars nil) (regexps '("bootstrap-version" "straight-[a-z-]+" "user-emacs-directory")) (regexp (format "^\\(%s\\)$" (mapconcat ... regexps "\\|")))) (mapatoms #'(lambda (sym) (if ... ...))) (mapcar #'(lambda (var) (list ... var ...)) vars))) (current-buffer)) (goto-char (point-max)) (print '(progn (straight-use-package-no-build `(straight :type git :host github :repo ,... :branch ,...)) (unless (and (boundp 'bootstrap-version) (integerp bootstrap-version) (>= bootstrap-version 3)) (let* ((recipe ...) (local-repo ...) (link-target ...) (link-name ...)) (ignore-errors (delete-file link-name)) (if (bound-and-true-p straight-use-symlinks) (if ... ... ...) (with-temp-file link-name ...))))) (current-buffer)) (let ((temp-file (make-temp-file "straight.el~"))) (write-region nil nil temp-file nil 'silent) (let ((temp-buffer (generate-new-buffer " *temp*" t))) (save-current-buffer (set-buffer temp-buffer) (unwind-protect (progn (if (= 0 ...) nil (error "straight.el bootstrap failed: %s" ...))) (and (buffer-name temp-buffer) (kill-buffer temp-buffer)))))))
  (let ((version nil) (straight-profiles (if (boundp 'straight-profiles) straight-profiles '((nil . "default.el")))) (straight-install-dir (or (and (boundp 'straight-base-dir) straight-base-dir) user-emacs-directory)) (print-length nil) (print-level nil)) (let ((--dolist-tail-- (mapcar #'cdr straight-profiles)) lockfile-name) (while --dolist-tail-- (setq lockfile-name (car --dolist-tail--)) (let ((lockfile-path (concat straight-install-dir "straight/versions/" lockfile-name))) (if (file-exists-p lockfile-path) (progn (condition-case nil (let ... ...) (end-of-file ...))))) (setq --dolist-tail-- (cdr --dolist-tail--)))) (if version nil (setq version :beta)) (save-current-buffer (set-buffer (url-retrieve-synchronously (format (concat "https://raw.githubusercontent.com/" "raxod502/straight.el/install/%s/straight.el") (substring (symbol-name version) 1)) 'silent 'inhibit-cookies)) (if (equal url-http-response-status 200) nil (error "Unknown recipe version: %S" version)) (delete-region (point-min) url-http-end-of-headers) (goto-char (point-min)) (princ ";; -*- coding: utf-8 -*-" (current-buffer)) (print (cons 'progn (let* ((vars nil) (regexps '...) (regexp (format "^\\(%s\\)$" ...))) (mapatoms #'(lambda ... ...)) (mapcar #'(lambda ... ...) vars))) (current-buffer)) (goto-char (point-max)) (print '(progn (straight-use-package-no-build `(straight :type git :host github :repo ... :branch ...)) (unless (and (boundp ...) (integerp bootstrap-version) (>= bootstrap-version 3)) (let* (... ... ... ...) (ignore-errors ...) (if ... ... ...)))) (current-buffer)) (let ((temp-file (make-temp-file "straight.el~"))) (write-region nil nil temp-file nil 'silent) (let ((temp-buffer (generate-new-buffer " *temp*" t))) (save-current-buffer (set-buffer temp-buffer) (unwind-protect (progn (if ... nil ...)) (and (buffer-name temp-buffer) (kill-buffer temp-buffer))))))))
  (progn (message "Bootstrapping straight.el...") (let ((min-version "25.1")) (if (version< emacs-version min-version) (progn (error (concat "straight.el requires at least Emacs %s, " "but you are running Emacs %s") min-version emacs-version)))) (if (boundp 'straight-repository-branch) (progn (if (stringp straight-repository-branch) nil (error "The `straight-repository-branch' must be a string ..." straight-repository-branch)))) (if (executable-find "git") nil (user-error "Git executable not found. straight.el requires git")) (require 'cl-lib) (require 'url-http) (defvar url-http-end-of-headers) (defvar url-http-response-status) (defalias 'straight--windows-os-p #'(lambda nil "Check if the current operating system is Windows." (memq system-type '(ms-dos windows-nt)))) (let ((version nil) (straight-profiles (if (boundp 'straight-profiles) straight-profiles '((nil . "default.el")))) (straight-install-dir (or (and (boundp 'straight-base-dir) straight-base-dir) user-emacs-directory)) (print-length nil) (print-level nil)) (let ((--dolist-tail-- (mapcar #'cdr straight-profiles)) lockfile-name) (while --dolist-tail-- (setq lockfile-name (car --dolist-tail--)) (let ((lockfile-path (concat straight-install-dir "straight/versions/" lockfile-name))) (if (file-exists-p lockfile-path) (progn (condition-case nil ... ...)))) (setq --dolist-tail-- (cdr --dolist-tail--)))) (if version nil (setq version :beta)) (save-current-buffer (set-buffer (url-retrieve-synchronously (format (concat "https://raw.githubusercontent.com/" "raxod502/straight.el/install/%s/straight.el") (substring (symbol-name version) 1)) 'silent 'inhibit-cookies)) (if (equal url-http-response-status 200) nil (error "Unknown recipe version: %S" version)) (delete-region (point-min) url-http-end-of-headers) (goto-char (point-min)) (princ ";; -*- coding: utf-8 -*-" (current-buffer)) (print (cons 'progn (let* ((vars nil) (regexps ...) (regexp ...)) (mapatoms #'...) (mapcar #'... vars))) (current-buffer)) (goto-char (point-max)) (print '(progn (straight-use-package-no-build `...) (unless (and ... ... ...) (let* ... ... ...))) (current-buffer)) (let ((temp-file (make-temp-file "straight.el~"))) (write-region nil nil temp-file nil 'silent) (let ((temp-buffer (generate-new-buffer " *temp*" t))) (save-current-buffer (set-buffer temp-buffer) (unwind-protect (progn ...) (and ... ...))))))) (message "Bootstrapping straight.el...done"))
  eval((progn (message "Bootstrapping straight.el...") (let ((min-version "25.1")) (if (version< emacs-version min-version) (progn (error (concat "straight.el requires at least Emacs %s, " "but you are running Emacs %s") min-version emacs-version)))) (if (boundp 'straight-repository-branch) (progn (if (stringp straight-repository-branch) nil (error "The `straight-repository-branch' must be a string ..." straight-repository-branch)))) (if (executable-find "git") nil (user-error "Git executable not found. straight.el requires git")) (require 'cl-lib) (require 'url-http) (defvar url-http-end-of-headers) (defvar url-http-response-status) (defalias 'straight--windows-os-p #'(lambda nil "Check if the current operating system is Windows." (memq system-type '(ms-dos windows-nt)))) (let ((version nil) (straight-profiles (if (boundp 'straight-profiles) straight-profiles '(...))) (straight-install-dir (or (and (boundp ...) straight-base-dir) user-emacs-directory)) (print-length nil) (print-level nil)) (let ((--dolist-tail-- (mapcar #'cdr straight-profiles)) lockfile-name) (while --dolist-tail-- (setq lockfile-name (car --dolist-tail--)) (let ((lockfile-path ...)) (if (file-exists-p lockfile-path) (progn ...))) (setq --dolist-tail-- (cdr --dolist-tail--)))) (if version nil (setq version :beta)) (save-current-buffer (set-buffer (url-retrieve-synchronously (format (concat "https://raw.githubusercontent.com/" "raxod502/straight.el/install/%s/straight.el") (substring ... 1)) 'silent 'inhibit-cookies)) (if (equal url-http-response-status 200) nil (error "Unknown recipe version: %S" version)) (delete-region (point-min) url-http-end-of-headers) (goto-char (point-min)) (princ ";; -*- coding: utf-8 -*-" (current-buffer)) (print (cons 'progn (let* (... ... ...) (mapatoms ...) (mapcar ... vars))) (current-buffer)) (goto-char (point-max)) (print '(progn (straight-use-package-no-build ...) (unless ... ...)) (current-buffer)) (let ((temp-file (make-temp-file "straight.el~"))) (write-region nil nil temp-file nil 'silent) (let ((temp-buffer ...)) (save-current-buffer (set-buffer temp-buffer) (unwind-protect ... ...)))))) (message "Bootstrapping straight.el...done")) nil)
  elisp--eval-last-sexp(t)
  eval-last-sexp(t)
  eval-print-last-sexp()
  (save-current-buffer (set-buffer (url-retrieve-synchronously "https://raw.githubusercontent.com/raxod502/straigh..." 'silent 'inhibit-cookies)) (goto-char (point-max)) (eval-print-last-sexp))
  (if (file-exists-p bootstrap-file) nil (save-current-buffer (set-buffer (url-retrieve-synchronously "https://raw.githubusercontent.com/raxod502/straigh..." 'silent 'inhibit-cookies)) (goto-char (point-max)) (eval-print-last-sexp)))
  (let ((bootstrap-file (expand-file-name "straight/repos/straight.el/bootstrap.el" user-emacs-directory)) (bootstrap-version 5)) (if (file-exists-p bootstrap-file) nil (save-current-buffer (set-buffer (url-retrieve-synchronously "https://raw.githubusercontent.com/raxod502/straigh..." 'silent 'inhibit-cookies)) (goto-char (point-max)) (eval-print-last-sexp))) (load bootstrap-file nil 'nomessage))
  eval-buffer(#<buffer  *load*> nil "/home/werner/.emacs.d/init.el" nil t)  ; Reading at buffer position 10604
  load-with-code-conversion("/home/werner/.emacs.d/init.el" "/home/werner/.emacs.d/init.el" t t)
  load("/home/werner/.emacs.d/init" noerror nomessage)
  startup--load-user-init-file(#f(compiled-function () #<bytecode 0xcb385b504c57876>) #f(compiled-function () #<bytecode -0x1f3c686ddc0dc635>) t)
  command-line()
  normal-top-level()

Any hints for solving this problem?

Regards, HY