Can't install scala in emacs - An error occurred while loading `/home/nazar_art/.emacs' - scala

I tried to install Scala accord this Set up for learning Scala with Emacs.
My current OS is Ubuntu 12.04.
I did exactly step by step.
After installation I run Emacs and see next error:
Warning (initialization): An error occurred while loading `/home/nazar_art/.emacs':
File error: Cannot open load file, scala-mode-auto
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.
I guessed that it is problem with permission. I change it for scala-mode but without success.
Here is content of ~/.emacs.d:
nazar_art#nazar-desktop:~/.emacs.d$ ls -lg
total 12
drwx------ 2 nazar_art 4096 Oct 10 10:58 auto-save-list
drwxrwxr-x 4 nazar_art 4096 Oct 5 00:12 elpa
drwxrwxrwx 4 nazar_art 4096 Oct 10 10:41 scala-mode
I'm newly at emacs and not sure that can find cause of error follow my intuition.
Any suggestion?
How to solve this trouble?

This worked for me:
Install Scala
sudo apt-get install scala
Get scala-mode
cd ~/git
git clone git://github.com/tuxdna/scala-mode.git
Set up the load-path
(add-to-list 'load-path "~/git/scala-mode")
Require scala-mode-auto
(require 'scala-mode-auto)
Created my first Scala source ~/first.scala. The mode was loaded.
object First {
def main(args: Array[String]) {
println("Test")
}
}
M-x scala-run-scala
Loaded the source with C-c C-l.
Entered First.main(null) in the interpreter. The program ran.

Related

Starting VS Code hangs with "GLIBCXX_3.4.20 not found", Can I point to a libstdc++.so.6 in a non-standard location?

Running RHEL 7.7 on the head node of a compute cluster. When I open VS Code 1.57.1 it hangs on the intro screen. Running with $ code --verbose, it shows the error: /usr/lib64/libstdc++.so.6: version GLIBCXX_3.4.20 not found. I have to kill -9 the hanging code process. Google tells me that the new version of VS Code uses Electron that requires the updated GLIBCXX version.
The installed version in /usr/lib64/libstdc++ is definitely out of date, and I can't update it. But I do have a newer version of GCC that is loaded by the $ module load gcc8/8.4.0 command that loads GCC from /cm/shared/apps/gcc8/8.4.0/. The library /cm/shared/apps/gcc8/8.4.0/lib64/libstdc++.so.6 has the requested version of GLIBCXX.
I have tried loading gcc8 before running code, but that doesn't change the error.
Is there a way to make VS Code use the alternative location for libstdc++.so.6? Is there an alternative to updating the system-wide libstdc++.so.6 library?
This is the full error message from --verbose:
Error: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.20' not found (required by /usr/share/code/resources/app/node_modules.asar.unpacked/spdlog/build/Release/spdlog.node)
at process.func [as dlopen] (electron/js2c/asar_bundle.js:5:1846)
This shows the out-of-date default version of libstdc++:
$ strings /usr/lib64/libstdc++.so.6 | grep GLIBCXX
GLIBCXX_3.4
GLIBCXX_3.4.1
GLIBCXX_3.4.2
...
GLIBCXX_3.4.18
GLIBCXX_3.4.19 <----Nope, this version is too old!
GLIBCXX_DEBUG_MESSAGE_LENGTH
This shows the other libstdc++ library has the required version:
$ strings /cm/shared/apps/gcc8/8.4.0/lib64/libstdc++.so.6 | grep GLIBCXX
GLIBCXX_3.4
GLIBCXX_3.4.1
GLIBCXX_3.4.2
...
GLIBCXX_3.4.19
GLIBCXX_3.4.20 <--- Here it is!
GLIBCXX_3.4.21
...
GLIBCXX_3.4.25
GLIBCXX_DEBUG_MESSAGE_LENGTH
Per scroveez's suggestion, the /usr/lib64/libstdc++.so.6 was indeed a symlink to the older version. To fix it I copied the 'new' version 25 library into /usr/lib64/ and changed the symlink to point to the newer version.
$ ll /usr/lib/libstdc++.so.*
lrwxrwxrwx 1 root root 18 Apr 30 2019 /usr/lib/libstdc++.so.5 -> libstdc++.so.5.0.7
-rwxr-xr-x 1 root root 739520 Nov 13 2014 /usr/lib/libstdc++.so.5.0.7
lrwxrwxrwx 1 root root 19 Jul 6 08:56 /usr/lib/libstdc++.so.6 -> libstdc++.so.6.0.25
-rwxr-xr-x 1 root root 934644 Mar 25 2020 /usr/lib/libstdc++.so.6.0.19
-rwxr-xr-x 1 root root 1570176 Jul 6 08:55 /usr/lib/libstdc++.so.6.0.25
$

raspistill returning file not found

I am trying to use the 64 bit version of raspbian (which can be found here: https://www.raspberrypi.org/forums/viewtopic.php?f=117&t=275370
I downloaded it, installed everything, ran my updates and then switched on the camera. But when I try to run it, the PI just gives back
bash: /opt/vc/bin/raspistill: No such file or directory
When I do a ls, I can see the directory fine:
pi#raspberrypi:/opt/vc/bin $ ls
containers_check_frame_int containers_test dtoverlay-pre raspiyuv
containers_datagram_receiver containers_test_bits dtparam tvservice
containers_datagram_sender containers_test_uri edidparser vcdbg
containers_dump_pktfile containers_uri_pipe mmal_vc_diag vcgencmd
containers_rtp_decoder dtmerge raspistill vchiq_test
containers_stream_client dtoverlay raspivid vcmailbox
containers_stream_server dtoverlay-post raspividyuv vcsmem
and when I look at the permissions, there are read/execute permissions for everyone:
-rwxr-xr-x 1 root root 142397 Nov 1 16:25 raspistill
Im at a bit of a loss here - the file is right there, so why is it not being found when I try to call it from the command line?
Unfortunately, it looks like MMAL userland still (at the time of writing this) has some unresolved issues with 64bit raspberry pi OS, so it is disabled.
However, one can use docker or cherry-build 32bit packages as workarounds.

linter pylint is not installed vscode

I know there are multiple version of this question on SO, I've tried the solutions posted on those threads and they don't seem to help :(
I have VS Code installed in an Ubuntu VM. I can't seem to get the python linter to work. i.e. I get a message saying
Linter pylint is not installed
I am pretty sure pylint is installed on the VM because when I run which pylint I have a valied output.
Here are the outputs for which python and which pylint respectively
/usr/bin/python
/home/rakshak/.local/bin/pylint
And I have the following in my User settings and workspace settings in VS Code
// Place your settings in this file to overwrite the default settings
{
"python.linting.pylintEnabled": true,
"python.linting.pylintPath": "/home/rakshak/.local/bin/pylint",
"python.pythonPath": "/usr/bin/python"
}
So, turns out this was just a permissions issue!
When I got the pylint not installed message, I was presented with a button to "Install pylint" this runs
sudo pip install pylint
This changed the owner of my .local/lib/ to root and made it inaccessible to vscode.
Output of ls -ld ~/.local/lib/ was
drwx------ 3 root root 4096 Sep 24 10:49 /home/userName/.local/lib/
Runing chown with my group and user fixed this issue.
sudo chown -R group:user ~/.local
now the output of ls -ld ~/.local/lib/ reads
drwx------ 3 userGroup userName 4096 Sep 24 10:49
/home/rakshak/.local/lib/
Have you checked with which python version you have installed pylint?
If you have used python 3.6 then the setting has to be like this:
"python.pythonPath": "/usr/bin/python3.6"

Can't run emacs as daemon

Trying to run
>emacs --daemon
in a shell produces
Warning: due to a long standing Gtk+ bug
http://bugzilla.gnome.org/show_bug.cgi?id=85715
Emacs might crash when run in daemon mode and the X11 connection is unexpectedly lost.
Using an Emacs configured with --with-x-toolkit=lucid does not have this problem.
Loading /home/me/.emacs.d/customizations/navigation.el (source)...
Loading /home/me/.emacs.d/.recentf...
Loading /home/me/.emacs.d/.recentf...done
Cleaning up the recentf list...
Loading /home/me/.emacs.d/customizations/navigation.el (source)...done
Loading /home/me/.emacs.d/customizations/ui.el (source)...
Backtrace:
emacs[0x505e79]
emacs[0x4ed4cc]
emacs[0x504b2e]
emacs[0x504ce3]
emacs[0x504d6f]
/lib/x86_64-linux-gnu/libpthread.so.0(+0xfc90)[0x7f1ba0acac90]
emacs[0x44cd4e]
emacs[0x471ad2]
emacs[0x55f137]
emacs[0x5939c3]
emacs[0x55ef53]
emacs[0x55f3fa]
emacs[0x566333]
emacs[0x566592]
emacs[0x55f137]
emacs[0x5939c3]
emacs[0x55ef53]
emacs[0x5939c3]
emacs[0x55ef53]
emacs[0x5939c3]
emacs[0x55ef53]
emacs[0x5939c3]
emacs[0x55ef53]
emacs[0x5939c3]
emacs[0x560148]
emacs[0x55e3e6]
emacs[0x58219a]
emacs[0x5824a9]
emacs[0x55f0fb]
emacs[0x5939c3]
emacs[0x55eb92]
emacs[0x55ef53]
emacs[0x55f309]
emacs[0x582a73]
emacs[0x55e607]
emacs[0x58219a]
emacs[0x5824a9]
emacs[0x55f0fb]
emacs[0x5939c3]
emacs[0x55eb92]
emacs[0x55ef53]
...
Error: server did not start correctly
Similar happens when I go with
> emacsclient -c -a ""
Starting emacs the normal way, I can do
M-x (server-start)
but I don't think it's actually working, because running
(defun --running-as-server ()
"Returns true if `server-start' has been called."
(condition-case nil
(and (boundp 'server-process)
(memq (process-status server-process)
'(connect listen open run)))
(error)))
in ielm gives only
(listen open run)
back instead of T or nil, and running
ELISP> (daemonp)
gives back nil. My version of Emacs is GNU Emacs 25.0.50.1 (x86_64-pc-linux-gnu, GTK+ Version 3.12.2) on Ubuntu 14.10. How can I get Emacs to run as a server/daemon?
I run emacs on Slackware 14.2 in daemon mode. My only issue was I was tired of seeing the warning. Other than that, the server ran fine for my purposes. What I did to get rid of the warning was to download the latest version of emacs from their official site
(emacs 26.1), removed the emacs package that came with my Slackware version, then unpacked and compiled the new version:
sudo tar -xvf emacs-26.1.tar.xz
./configure --with-x-toolkit=lucid
make
sudo make install
It's been running fine, no problems and no warning when the server starts.
You might want to give that a try. The GNU Project site here http://mirror.keystealth.org/gnu/emacs/ has the latest versions in .tar.gz format as well if you prefer
I was encountering this same error and was able to resolve it by removing my .emacs.d directory.
rm -fr ~/.emacs.d

Emacs: How does one run RSpec?

How does one run rspec-mode in emacs? What I have tried is:
Go to spec file in Emacs
Run M-x rspec-verify-all
I get the following output in *rspec-compilation* buffer
-*- mode: rspec-compilation; default-directory: "~/mydir" -*-
RSpec Compilation started at Sun Feb 15 21:31:36
bundle exec rake spec SPEC_OPTS='--options /Users/rabraham/mydir/.rspec' SPEC='/Users/rabraham/mydir/spec'
RSpec Compilation finished at Sun Feb 15 21:31:39
No tests are run. I have a failing test but that is not caught. Is there a tutorial on running rspec-mode in Emacs?
There is no rake "spec" task by default. You should configure your Rakefile like described here