syl20bnr / spacemacs

A community-driven Emacs distribution - The best editor is neither Emacs nor Vim, it's Emacs *and* Vim!
http://spacemacs.org
GNU General Public License v3.0
23.69k stars 4.89k forks source link

File error: Cannot open load file, No such file or directory, bind-map #8984

Closed achikin closed 7 years ago

achikin commented 7 years ago

Description :octocat:

Freshly installed spacemacs does not work because of init.el error

Reproduction guide :beetle:

Observed behaviour: :eyes: :broken_heart:

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

File error: Cannot open load file, No such file or directory, bind-map

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.

Expected behaviour: :heart: :smile: Emacs starts without errors

Backtrace :paw_prints:

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

File error: Cannot open load file, No such file or directory, bind-map

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.
shelper commented 5 years ago

still have this issue... tried --insecure and didnt work. tried delete and reinstall, didn't work, frustrating :(

bradyt commented 5 years ago

Consider if you see the following message, like in the initial issue.

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.

Then be sure to try emacs --debug-init. That may provide more information to share here. It doesn't look like such a backtrace has been shared in this thread.

And in my opinion, --insecure is not a good solution.

KraevRoot commented 5 years ago

@bradyt output with --debug-init

shelper commented 5 years ago

i think it is network related, i used another network, and the problem is gone.

daiiyu commented 5 years ago

For me, Since I reinstall the new system and left home directory not formatted, the file's ownership was not mime. so,

sudo chown -R .emacs.d/

the error was solved by this way.

bradyt commented 5 years ago

@KraevRoot btw, images of text are not conducive to troubleshooting. If anyone spots a suspicious line to search for, they have to type it out, instead of being able to copy paste text.

Also, folks may as well provide OS, emacs version, and output of emacs -batch --eval "(message \"%S\" (gnutls-available-p))"

I wonder if some of these links are relevant:

jerome-diver commented 5 years ago

maybe one day emacs/sapcemacs will tell where and which line the problem is from... it will be a big day for emacs life.

Compro-Prasad commented 5 years ago

I think it already does jump to specific location of error if you do M-x toggle-debug-on-error before reproducing the error. Then you can just click on the backtrace links to jump to the specific location of the error.

daiiyu commented 5 years ago

It works to me when I delete ".emacs.d/.cache". Emacs recompiled everything and everything goes fine.

pgauding commented 5 years ago

I moved my .emacs (which was and is symlinked) to .emacs.bak, opened emacs and allowed it to recompile, then moved .emacs.bak back to .emacs. Everything's peachy.

SreenivasVRao commented 5 years ago

Seeing this error still... Any alternatives to --insecure?

So this worked: I don't think it's ideal:

Was originally trying to make it work on Emacs 26.1

  1. I assume you have emacs 26.1 installed + spacemacs installed.

Install Emacs 26.2:

  1. add kelleyk ppa

sudo add-apt-repository ppa:kelleyk/emacs sudo apt update sudo apt install emacs26

  1. Launch 26.2 -> this seems to get spacemacs running with installing required packages.

  2. Either continue using 26.2, or launch 26.1. (Magically started working with 26.1 after this - possibly because they share the same .emacs.d or .spacemacs files?

Hope it helps!

jerome-diver commented 5 years ago

my alternative way to resolve anything there was to go with Doom.

strokyl commented 5 years ago

For me:

gpg --homedir ~/.emacs.d/elpa/gnupg --receive-keys 066DAFCB81E42C40

dit the trick after using ppa:kelleyk/emacs but maybe it would have work before. I am on ubuntu bionic

strokyl commented 5 years ago

Ok on my other PC, on ubuntu disco, same issue solved by:

gpg --homedir ~/.emacs.d/elpa/gnupg --receive-keys 066DAFCB81E42C40
jiftle commented 5 years ago

me too.

Plaoo commented 5 years ago

gpg --homedir ~/.emacs.d/elpa/gnupg --receive-keys 066DAFCB81E42C40

Works!! Thanks

jjforsythe commented 5 years ago

Thanks for the answers above. I required a small modification which some people may find useful.

Whilst running the develop branch of Spacemacs from ~/.emacs.d/spacemacs/ (i.e. having modified the spacemacs-start-directory variable), I needed to modify the command above to point to ~/.emacs.d/spacemacs/elpa/25.2/develop/gnupg e.g.

gpg --homedir ~/.emacs.d/spacemacs/elpa/25.2/develop/gnupg --receive-keys 066DAFCB81E42C40

Note that this command needs to be updated with the version of Emacs you are running, in place of 25.2 above. Once Spacemacs is running you can also check the package-user-dir variable if you want to be completely sure that you are targeting the correct directory.

ghost commented 5 years ago

gpg --homedir ~/.emacs.d/elpa/gnupg --receive-keys 066DAFCB81E42C40

Thanks!! The spacemacs is able to run on emacs 26.1.

xoltar commented 4 years ago

For me the problem was proxies. I was on a work machine, but not using VPN, so proxy info was wrong. Clearing the https_proxy env var fixed it.

gamepad-coder commented 3 years ago

Confirming solution.

Recipe worked for me: https://github.com/syl20bnr/spacemacs/issues/8984#issuecomment-306130164

System OS : Windows 10 Using: WSL2 with a Mintty/WSLtty terminal running Bash

Overview Loading Spacemacs directly into Bash using emacs -nw failed before changing the default dotspacemacs-elpa-timeout 5.

Successful install after changing to dotspacemacs-elpa-timeout 500, same command emacs -nw to launch.

Setup

  1. No preexisting Emacs. No preexisting Spacemacs.
  2. Installed emacs using apt-get install emacs
  3. Removed ~/.emacs.d
  4. Git cloned spacemacs into ~/.emacs.d
  5. Fresh first launch in WSL2 Bash using emacs -nw
    -> same error as top post.

Then success after I applied this recipe: ~/spacemacs : around line 89 : Default value is dotspacemacs-elpa-timeout 5. Changed to dotspacemacs-elpa-timeout 500 (arbitrarily much larger).

Thanks a million. Hoping this helps someone's search results.

thecocoa commented 3 years ago

Failing for me today - Ubuntu 20.04. No exisiting ~/.emacs.d directory.

emacs -q loads vanilla emacs just fine.

emacs -nw gives the following error:

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

Wrong type argument: stringp, async

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.

Have cloned/deleted ~/.emacs.d, recloned at least 4x. Maybe I'll wait until tomorrow incase it truly is a MELPA problem. I would suggest, however, that the dotspacemacs-elpa-timeout be increased from 5 to 60.

duianto commented 3 years ago

@thecocoa It seems to have been an upstream issue, that's been fixed. Cannot update packages, because the generated -pkg.el file uses a symbol instead of a string https://github.com/melpa/melpa/issues/7312

zhaozhiwei1992 commented 3 years ago

dotspacemacs-elpa-timeout 30 emacs --insecure

works for me, thank

Melkor333 commented 3 years ago

For those who install spacemacs on windows with chocolatey, I had to go to the path %appdata% and then change the permissions of the folder .emacs.d so that my user has access to that folder. Chocolatey seems to somehow install the folder with administrator only permissions.