New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't install spacemacs on Ubuntu 16.04 with Emacs 24.5.1 #6701

Open
anmoljagetia opened this Issue Jul 28, 2016 · 18 comments

Comments

@anmoljagetia

anmoljagetia commented Jul 28, 2016

I have been trying to install spacemacs, but I can't connect to the packages for some weird reason. I have followed the exact steps listed in the README and have had success with the installation on a debian machine, but on Ubuntu I am stuck here, for quite a while now.

I tried the emacs --insecure flag, but nothign happens and running,

emacs --insecure --debug-init

returns the following error message :

Debugger entered--Lisp error: (error "Package `evil-' is unavailable")
  signal(error ("Package `evil-' is unavailable"))
  error("Package `%s-%s' is unavailable" evil "")
  package-compute-transaction(nil ((evil)))
  package-install(evil)
  (if pkg-elpa-dir (add-to-list (quote load-path) pkg-elpa-dir) (if log (progn (spacemacs-buffer/append (format "(Bootstrap) Installing %s...\n" pkg)) (spacemacs//redisplay))) (configuration-layer/retrieve-package-archives (quote quiet)) (package-install pkg) (setq pkg-elpa-dir (spacemacs//get-package-directory pkg)))
  (let ((pkg-elpa-dir (spacemacs//get-package-directory pkg))) (if pkg-elpa-dir (add-to-list (quote load-path) pkg-elpa-dir) (if log (progn (spacemacs-buffer/append (format "(Bootstrap) Installing %s...\n" pkg)) (spacemacs//redisplay))) (configuration-layer/retrieve-package-archives (quote quiet)) (package-install pkg) (setq pkg-elpa-dir (spacemacs//get-package-directory pkg))) (require pkg nil (quote noerror)) (if file-to-load (progn (load-file (concat pkg-elpa-dir file-to-load)))) pkg-elpa-dir)
  (condition-case nil (require pkg) (error (require (quote cl)) (let ((pkg-elpa-dir (spacemacs//get-package-directory pkg))) (if pkg-elpa-dir (add-to-list (quote load-path) pkg-elpa-dir) (if log (progn (spacemacs-buffer/append (format "(Bootstrap) Installing %s...\n" pkg)) (spacemacs//redisplay))) (configuration-layer/retrieve-package-archives (quote quiet)) (package-install pkg) (setq pkg-elpa-dir (spacemacs//get-package-directory pkg))) (require pkg nil (quote noerror)) (if file-to-load (progn (load-file (concat pkg-elpa-dir file-to-load)))) pkg-elpa-dir)))
  (let ((warning-minimum-level :error)) (condition-case nil (require pkg) (error (require (quote cl)) (let ((pkg-elpa-dir (spacemacs//get-package-directory pkg))) (if pkg-elpa-dir (add-to-list (quote load-path) pkg-elpa-dir) (if log (progn (spacemacs-buffer/append ...) (spacemacs//redisplay))) (configuration-layer/retrieve-package-archives (quote quiet)) (package-install pkg) (setq pkg-elpa-dir (spacemacs//get-package-directory pkg))) (require pkg nil (quote noerror)) (if file-to-load (progn (load-file (concat pkg-elpa-dir file-to-load)))) pkg-elpa-dir))))
  spacemacs/load-or-install-package(evil t nil)
  spacemacs/load-or-install-protected-package(evil t)
  spacemacs/init()

(if (not (version<= spacemacs-emacs-min-version emacs-version)) (message (concat "Your version of Emacs (%s) is too old. " "Spacemacs requires Emacs version %d or above.") emacs-version spacemacs-emacs-min-version) (load-file (concat user-emacs-directory "core/core-load-paths.el")) (require (quote core-spacemacs)) (spacemacs/init) (spacemacs/maybe-install-dotfile) (configuration-layer/sync) (spacemacs/setup-startup-hook) (require (quote server)) (if (server-running-p) nil (server-start)))
  eval-buffer(#<buffer  *load*> nil "/home/anmol/.emacs.d/init.el" nil t)  ; Reading at buffer position 1074
  load-with-code-conversion("/home/anmol/.emacs.d/init.el" "/home/anmol/.emacs.d/init.el" t t)
  load("/home/anmol/.emacs.d/init" t t)
  #[0 "�\205\262�   \306=\203��\307�\310Q\202;� \311=\204��\307�\312Q\202;�\313\307\314\315#\203*�\316\202;�\313\307\314\317#\203:�\320\nB�\321\202;�\316\322�\323�\322\211#\210�\322=\203a�\324\325\326\307�\327Q!\"\323�\322\211#\210�\322=\203`���\210�\203\243�\330�!\331\232\203\243�\332�!\211\333P\334�!\203}�\211\202\210�\334�!\203\207��\202\210�\314\262��\203\241�\335��\"\203\237�\336\337��#\210\340\341!\210��\266�\f?\205\260�\314�\323\342\322\211#)\262�\207" [init-file-user system-type delayed-warnings-list user-init-file inhibit-default-init inhibit-startup-screen ms-dos "~" "/_emacs" windows-nt "/.emacs" directory-files nil "^\\.emacs\\(\\.elc?\\)?$" "~/.emacs" "^_emacs\\(\\.elc?\\)?$" (initialization "`_emacs' init file is deprecated, please use `.emacs'") "~/_emacs" t load expand-file-name "init" file-name-as-directory "/.emacs.d" file-name-extension "elc" file-name-sans-extension ".el" file-exists-p file-newer-than-file-p message "Warning: %s is newer than %s" sit-for 1 "default"] 7 "\n\n(fn)"]()
  command-line()
  normal-top-level()

@crshd

This comment has been minimized.

crshd commented Jul 29, 2016

Running things with sudo is not a solution for every problem.

@lsytj0413

This comment has been minimized.

lsytj0413 commented Jul 29, 2016

Maybe it just because this package isn't install.
I use spacemacs on Ubuntu16.04

@azadaquib

This comment has been minimized.

azadaquib commented Jul 29, 2016

Maybe not. But spacemacs on first run fetches all repos and tries to install all extensions. Some of these directories are not owned by the user. So for the first run you use sudo emacs then chown -R <user-name> ~/.emacs.d to own the .emacs.d folder. Hope this helps

@anmoljagetia

This comment has been minimized.

anmoljagetia commented Jul 29, 2016

@azadaquib isn't the .emacs.d folder already in the users home directory?
@lsytj0413 None of the packages are installed, the problem is, that I ran the git clone, and started emacs. I suppose, all the required packages should be fetched at this point, but unfortunately, that's not happening in this case.
I also got the installation to work on a Debian machine before, however I have been at this for a while. I will try the sudo option and post back my results.

Thanks 👍

@azadaquib

This comment has been minimized.

azadaquib commented Jul 29, 2016

@anmoljagetia actually when you sudo emacs the first time the packages installed are done with root priviledges and so the folder .emacs.d ends up with files with some owned by root.
Apparently after this if you start emacs as a normal user a few extensions just won't respond because of lack of write privileges. For me the savehist plugin wouldn't write to buffer and would subsequently crash.

@anmoljagetia

This comment has been minimized.

anmoljagetia commented Jul 29, 2016

sudo emacs doesn't work :(

Still getting the same error! This is not some permissions issue, it is because I can't connect to the network. I know it's hard to debug these, but I am directly connected to the Internet (no proxy or anything). Shouldn't be very difficult, unfortunately, I haven't been able to figure out how to get this to work :(

@syl20bnr

This comment has been minimized.

Owner

syl20bnr commented Jul 31, 2016

emacs --insecure is not sufficient on master if you have .spacemacs file in your home directory.
In your dotfile set dotspacemacs-elpa-https to nil and retry.
I think this bug is fixed in develop where --insecure takes precedence.

@anmoljagetia

This comment has been minimized.

anmoljagetia commented Aug 1, 2016

I don't have a .spacemacs file. Also tried on the develop branch, but the emacs --insecure doesn't work. The .spacemacs file doesn't exist so I am unsure where to add the dotspacemacs-elpa-https flag?

@TheBB

This comment has been minimized.

Collaborator

TheBB commented Aug 1, 2016

Spacemacs should install one for you, but if it doesn't get to that point you can grab the template from ~/.emacs.d/core/templates/.spacemacs.template and move it to ~/.spacemacs

@anmoljagetia

This comment has been minimized.

anmoljagetia commented Aug 1, 2016

Okay, I deleted and recloned, and this time it generates the .spacemacs file. I switched to the develop branch, and started with the emacs --insecure command, and also changed the value here.

The error I get is :

Debugger entered--Lisp error: (error "Package `spacemacs-theme-' is unavailable")
  signal(error ("Package `spacemacs-theme-' is unavailable"))
  error("Package `%s-%s' is unavailable" spacemacs-theme "")
  package-compute-transaction(nil ((spacemacs-theme)))
  package-install(spacemacs-theme)
  (if pkg-elpa-dir (add-to-list (quote load-path) pkg-elpa-dir) (if log (progn (spacemacs-buffer/append (format "(Bootstrap) Installing %s...\n" pkg)) (spacemacs//redisplay))) (configuration-layer/retrieve-package-archives (quote quiet)) (package-install pkg) (setq pkg-elpa-dir (spacemacs//get-package-directory pkg)))
  (let ((pkg-elpa-dir (spacemacs//get-package-directory pkg))) (if pkg-elpa-dir (add-to-list (quote load-path) pkg-elpa-dir) (if log (progn (spacemacs-buffer/append (format "(Bootstrap) Installing %s...\n" pkg)) (spacemacs//redisplay))) (configuration-layer/retrieve-package-archives (quote quiet)) (package-install pkg) (setq pkg-elpa-dir (spacemacs//get-package-directory pkg))) (require pkg nil (quote noerror)) (if file-to-load (progn (load-file (concat pkg-elpa-dir file-to-load)))) pkg-elpa-dir)
  (if (require pkg nil (quote noerror)) nil (require (quote cl)) (let ((pkg-elpa-dir (spacemacs//get-package-directory pkg))) (if pkg-elpa-dir (add-to-list (quote load-path) pkg-elpa-dir) (if log (progn (spacemacs-buffer/append (format "(Bootstrap) Installing %s...\n" pkg)) (spacemacs//redisplay))) (configuration-layer/retrieve-package-archives (quote quiet)) (package-install pkg) (setq pkg-elpa-dir (spacemacs//get-package-directory pkg))) (require pkg nil (quote noerror)) (if file-to-load (progn (load-file (concat pkg-elpa-dir file-to-load)))) pkg-elpa-dir))
  (let ((warning-minimum-level :error)) (if (require pkg nil (quote noerror)) nil (require (quote cl)) (let ((pkg-elpa-dir (spacemacs//get-package-directory pkg))) (if pkg-elpa-dir (add-to-list (quote load-path) pkg-elpa-dir) (if log (progn (spacemacs-buffer/append (format "(Bootstrap) Installing %s...\n" pkg)) (spacemacs//redisplay))) (configuration-layer/retrieve-package-archives (quote quiet)) (package-install pkg) (setq pkg-elpa-dir (spacemacs//get-package-directory pkg))) (require pkg nil (quote noerror)) (if file-to-load (progn (load-file (concat pkg-elpa-dir file-to-load)))) pkg-elpa-dir)))
  configuration-layer/load-or-install-package(spacemacs-theme)
  (let* ((pkg (spacemacs//get-theme-package theme)) (pkg-dir (configuration-layer/load-or-install-package pkg))) (if (or (eq (quote moe-light) theme) (eq (quote moe-dark) theme)) (progn (load-file (concat pkg-dir "moe-light-theme.el")) (load-file (concat pkg-dir "moe-dark-theme.el")))) (add-to-list (quote custom-theme-load-path) pkg-dir))
  (cond ((assq theme spacemacs-theme-name-to-package) (let* ((pkg (spacemacs//get-theme-package theme)) (pkg-dir (configuration-layer/load-or-install-package pkg))) (if (or (eq (quote moe-light) theme) (eq (quote moe-dark) theme)) (progn (load-file (concat pkg-dir "moe-light-theme.el")) (load-file (concat pkg-dir "moe-dark-theme.el")))) (add-to-list (quote custom-theme-load-path) pkg-dir))) (t (let ((pkg (spacemacs//get-theme-package theme))) (configuration-layer/load-or-install-package pkg))))
  (if (or (memq theme (custom-available-themes)) (eq (quote default) theme)) nil (cond ((assq theme spacemacs-theme-name-to-package) (let* ((pkg (spacemacs//get-theme-package theme)) (pkg-dir (configuration-layer/load-or-install-package pkg))) (if (or (eq (quote moe-light) theme) (eq (quote moe-dark) theme)) (progn (load-file (concat pkg-dir "moe-light-theme.el")) (load-file (concat pkg-dir "moe-dark-theme.el")))) (add-to-list (quote custom-theme-load-path) pkg-dir))) (t (let ((pkg (spacemacs//get-theme-package theme))) (configuration-layer/load-or-install-package pkg)))))
  (progn (if (or (eq (quote zonokai-blue) theme) (eq (quote zonokai-red) theme) (eq (quote solarized-light) theme) (eq (quote solarized-dark) theme)) (progn (configuration-layer/load-or-install-package (quote dash)))) (if (or (memq theme (custom-available-themes)) (eq (quote default) theme)) nil (cond ((assq theme spacemacs-theme-name-to-package) (let* ((pkg (spacemacs//get-theme-package theme)) (pkg-dir (configuration-layer/load-or-install-package pkg))) (if (or (eq ... theme) (eq ... theme)) (progn (load-file ...) (load-file ...))) (add-to-list (quote custom-theme-load-path) pkg-dir))) (t (let ((pkg (spacemacs//get-theme-package theme))) (configuration-layer/load-or-install-package pkg))))))
  (condition-case err (progn (if (or (eq (quote zonokai-blue) theme) (eq (quote zonokai-red) theme) (eq (quote solarized-light) theme) (eq (quote solarized-dark) theme)) (progn (configuration-layer/load-or-install-package (quote dash)))) (if (or (memq theme (custom-available-themes)) (eq (quote default) theme)) nil (cond ((assq theme spacemacs-theme-name-to-package) (let* ((pkg ...) (pkg-dir ...)) (if (or ... ...) (progn ... ...)) (add-to-list (quote custom-theme-load-path) pkg-dir))) (t (let ((pkg ...)) (configuration-layer/load-or-install-package pkg)))))) ((debug quote error) (setq theme (quote default)) (display-warning (quote spacemacs) (format (concat "An error occurred while retrieving the " "theme, using default theme. (error: %s)") err) :warning)))
  spacemacs/load-theme(spacemacs-dark)
  (let ((default-theme (car dotspacemacs-themes))) (spacemacs/load-theme default-theme) (setq configuration-layer--protected-packages (append (delq nil (mapcar (quote spacemacs//get-theme-package) dotspacemacs-themes)) configuration-layer--protected-packages)) (setq-default spacemacs--cur-theme default-theme) (setq-default spacemacs--cycle-themes (cdr dotspacemacs-themes)))
  spacemacs/init()
  (if (not (version<= spacemacs-emacs-min-version emacs-version)) (message (concat "Your version of Emacs (%s) is too old. " "Spacemacs requires Emacs version %s or above.") emacs-version spacemacs-emacs-min-version) (load-file (concat (file-name-directory load-file-name) "core/core-load-paths.el")) (require (quote core-spacemacs)) (spacemacs/init) (spacemacs/maybe-install-dotfile) (configuration-layer/sync) (spacemacs-buffer/display-info-box) (spacemacs/setup-startup-hook) (require (quote server)) (if (server-running-p) nil (server-start)))
  eval-buffer(#<buffer  *load*> nil "/home/anmol/.emacs.d/init.el" nil t)  ; Reading at buffer position 1194
  load-with-code-conversion("/home/anmol/.emacs.d/init.el" "/home/anmol/.emacs.d/init.el" t t)
  load("/home/anmol/.emacs.d/init" t t)
  #[0 "�\205\262� \306=\203��\307�\310Q\202;� \311=\204��\307�\312Q\202;�\313\307\314\315#\203*�\316\202;�\313\307\314\317#\203:�\320\nB�\321\202;�\316\322�\323�\322\211#\210�\322=\203a�\324\325\326\307�\327Q!\"\323�\322\211#\210�\322=\203`���\210�\203\243�\330�!\331\232\203\243�\332�!\211\333P\334�!\203}�\211\202\210�\334�!\203\207��\202\210�\314\262��\203\241�\335��\"\203\237�\336\337��#\210\340\341!\210��\266�\f?\205\260�\314�\323\342\322\211#)\262�\207" [init-file-user system-type delayed-warnings-list user-init-file inhibit-default-init inhibit-startup-screen ms-dos "~" "/_emacs" windows-nt "/.emacs" directory-files nil "^\\.emacs\\(\\.elc?\\)?$" "~/.emacs" "^_emacs\\(\\.elc?\\)?$" (initialization "`_emacs' init file is deprecated, please use `.emacs'") "~/_emacs" t load expand-file-name "init" file-name-as-directory "/.emacs.d" file-name-extension "elc" file-name-sans-extension ".el" file-exists-p file-newer-than-file-p message "Warning: %s is newer than %s" sit-for 1 "default"] 7 "\n\n(fn)"]()
  command-line()
  normal-top-level()
@noxecane

This comment has been minimized.

noxecane commented Aug 20, 2016

Was having the same problem on Arch Linux. So I:

$ git clone --depth=1 https://github.com/syl20bnr/spacemacs.git 
$ mv spacemacs .emacs.d/
$ emacs --insecure --debug-init 

But it can't find adaptive-wrap@spacemacs and has a problem installing paradox@spacemacs with standard installation

@tonyfloatersu

This comment has been minimized.

tonyfloatersu commented Sep 10, 2016

Things are strange...
The first time I install spacemacs, after the command "emacs --insecure", it turned to be "unknown command `--insecure'".
Then I just used sudo rm -f /.emacs.d.
The second time I install spacemacs, I recloned again, to the origin place, then this time I succeeded...

@noxecane

This comment has been minimized.

noxecane commented Sep 17, 2016

--insecure seems to be an option only understood by spacemacs, but one must make sure to clone the spacemacs repo to .emacs.d/.

@hansenrl

This comment has been minimized.

hansenrl commented Nov 14, 2016

I'm having similar problems to the original report - I think something is getting consistently corrupted in the package downloads from ELPA. I'm on Ubuntu 16.04 and I've tried Emacs 24.5 from the repositories and 25.1 from source, and the problem occurs with both. I'm also using the --insecure option because of https issues in my environment.

This error I'm pasting is an unbalanced parenthesis error, but there are other errors that pop up (invalid argument errors, corrupted tar errors) and it happens to different files every time.

Debugger entered--Lisp error: (error "evil-search-highlight-persist.el:0:0: error: scan-error: (Unbalanced parentheses 7993 8106)")
  signal(error ("evil-search-highlight-persist.el:0:0: error: scan-error: (Unbalanced parentheses 7993 8106)"))
  error("%s:0:0: error: %s: %s" "evil-search-highlight-persist.el" scan-error ("Unbalanced parentheses" 7993 8106))
  autoload-generate-file-autoloads("evil-search-highlight-persist.el" nil "/home/test/.emacs.d/elpa/evil-search-highlight-persist-20160912.807/evil-search-highlight-persist-autoloads.el")
  update-directory-autoloads("/home/test/.emacs.d/elpa/evil-search-highlight-persist-20160912.807")
  package-generate-autoloads(evil-search-highlight-persist "/home/test/.emacs.d/elpa/evil-search-highlight-persist-20160912.807")
  package--make-autoloads-and-stuff([cl-struct-package-desc evil-search-highlight-persist (20160912 807) "Persistent highlights after search" ((highlight (0))) single "melpa" nil nil nil] "/home/test/.emacs.d/elpa/evil-search-highlight-persist-20160912.807")
@anmoljagetia

This comment has been minimized.

anmoljagetia commented Nov 15, 2016

Doing the same steps works perfectly for me on MacOS Sierra, on the same network. Unfortunately, still can't get it work on Ubuntu 16.04 😞

@zhexuany

This comment has been minimized.

Contributor

zhexuany commented Nov 17, 2016

@anmoljagetia I am using emacs25.1 on Ubuntu 16.04. What is the way that you install emacs 24.5?

@anmoljagetia

This comment has been minimized.

anmoljagetia commented Nov 22, 2016

I updated to Emacs 25. I installed 24.5 using the package manager, as that was the latest version available on the package manager back then. But even with 25, I still face the same issue. However, I have been using Spacemacs comfortably on MacOS.

The search for the right solution is still on.

@zhexuany

This comment has been minimized.

Contributor

zhexuany commented Nov 22, 2016

@anmoljagetia The way I installed emacs 25 is the following. I strongly suggest you give a try and see what will happens.

sudo apt-get install autoconf automake libtool texinfo build-essential xorg-dev libgtk2.0-dev libjpeg-dev libncurses5-dev libdbus-1-dev libgif-dev libtiff-dev libm17n-dev libpng12-dev librsvg2-dev libotf-dev libgnutls-dev libxml2-dev

wget http://ftp.gnu.org/gnu/emacs/emacs-25.1.tar.gz

tar xvf emacs-25.1.tar.gz

cd  emacs-25.1
./configure --with-x-toolkit=lucid --with-modules
make bootstrap
sudo make install

I am also using Ubuntu 16.04. My logic is quite simple. If Spacemacs works in my machine, it must work in others unless you install emacs in a wrong way.

If above approach does not work, try to disable https. You can find it here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment