kaushalmodi / .emacs.d

My emacs configuration
MIT License
261 stars 49 forks source link

Issues setting up emacs (version < 27) #45

Open adammartiniello opened 2 years ago

adammartiniello commented 2 years ago

NOTE: Some of the issues below may not be directly related to this emacs repo, but I wanted to document all the issues I faced when installing/setting up emacs on my Raspberry Pi.

Steps:

  1. Installed emacs using sudo apt install emacs. This installed version 26.1
  2. Ran ./force_update_emacsd.sh ~/.emacs.d
  3. Tried opening emacs, but failed to install melpa. Needed to create a temporary init.el file and added the following code from https://melpa.org/#/getting-started. NOTE: This also did not work until I changed 'https' to 'http' which I found suggested in some threads after googling the error (https://stackoverflow.com/questions/67062723/file-error-https-melpa-org-packages-archive-contents-bad-request-during-em).
    (require 'package)
    (add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/") t)
    ;; Comment/uncomment this line to enable MELPA Stable if desired.  See `package-archive-priorities`
    ;; and `package-pinned-packages`. Most users will not need or want to do this.
    ;;(add-to-list 'package-archives '("melpa-stable" . "https://stable.melpa.org/packages/") t)
    (package-initialize)
  4. Also needed to add this section from "Failed to download ‘MELPA’ archive" on the melpa link above. -- Error: Failed to download 'gnu' archive. Bad request -- Fix: (setq gnutls-algorithm-priority "NORMAL:-VERS-TLS1.3")
  5. Open emacs once using this temporary init.el file installed melpa successfully
  6. Then switched back to init.el from the git repo and it was able to open and install most of the packages.
  7. Now emacs opens with the following errors
    Error (use-package): Failed to install mastodon: Package  emacs-27.1  is unavailable
    Error (use-package): Cannot load org-entities
    Error (use-package): ob/:init: Cannot open load file: No such file or directory, org
    Error (use-package): org-sticky-header/:catch: Cannot open load file: No such file or directory, org
    Error (use-package): org-link-ref/:catch: Symbol s function definition is void: org-add-link-type
    Error (use-package): toc-org/:catch: Cannot open load file: No such file or directory, org
    Error (use-package): org-noter/:catch: Cannot open load file: No such file or directory, org
    Error (use-package): desktop/:config: Cannot open load file: No such file or directory, org

Simple solution is to probably install at least emacs 27.1 or above, but unsure of the best way to do that. I assumed sudo apt install emacs would install the most recently released version. Can you please advise?

adammartiniello commented 2 years ago

Still getting these issues after upgrading to emacs 28.1. For now, I'm commenting out the 'setup-org which resolves the issues.

kaushalmodi commented 2 years ago

Still getting these issues after upgrading to emacs 28.1.

Thanks for testing this on 28.1. I haven't tried a fresh clone of this config is quite some time. I'll try that out and clean up any issues.