I installed Erlang on my Mac (OS X) and my Ubuntu 14.04 pc. Trying to create a map works on the Mac but the exact same code yields an error on my Ubuntu pc. I have tried it on one other computer and it worked there as well. This is the code:
Map = #{"hi" => 42} .
It's the sample code from here. On my Ubuntu install it says syntax error before {.
Could it be some kind of problem with my version of Erlang? I installed it from aptitude. When I start it, it says "Eshell V5.10.4".
It is the same if I write the code in a file and try to compile it from the shell.
Your Erlang installation is too old. 5.10.4 was the version number of the emulator released in R16B03, while maps were introduced in 17.0.
If you need up-to-date Erlang packages for Ubuntu, you can find them here. Either add the repository as described at that page, or scroll down to download packages manually. (Full disclosure: provided by my employer)
Related
My Python project is very windows-centric, we want the benefits of containers but we can't give up Windows just yet.
I'd like to be able to use the Dockerized remote python interpreter feature that comes with IntelliJ. This works flawlessly with Python running on a standard Linux container, but appears to work not at all for Python running on a Windows container.
I've built a new image based on a standard Microsoft Server core image. I've installed Miniconda, bootstrapped a Python environment and verified that I can start an interactive Python session from the command prompt.
Whenever I try to set this up I get an error message: "Can't retrieve image ID from build stream". This occurs at the moment when IntelliJ would have normally detected the python interpreter and it's installed libraries.
I also tried giving the full path for the interpreter: c:\miniconda\envs\htp\python.exe
I've never seen any mention that this works in the documentation, but nor have I seen any mention that it does not work. I totally accept that Windows Containers are an oddity, so it's entirely possible that IntelliJ's remote-Python feature was never tested on Python running in Windows containers.
So, has anybody got this feature working with Python running on a Windows container yet? Is there any reason to believe that it does or does not work?
Regrettably, it is not supported yet. Please vote for the feature request https://youtrack.jetbrains.com/issue/PY-45222 in order to increase its priority.
I am following the beginner rosnode tutorial http://wiki.ros.org/ROS/Tutorials/UnderstandingNodes
The environment is Windows 10 / WSL. When I enter command "rosrun turtlesim turtlesim_node" after running "roscore", I get the following error:
wn-003% rosrun turtlesim turtlesim_node
QXcbConnection: Could not connect to display
zsh: abort (core dumped) rosrun turtlesim turtlesim_node
Are there any solutions to this? Thanks.
WLS doesn't support graphical interfaces. You need to initialize some "x server for windows" application, like Xming and then type this line in WLS terminal:
export DISPLAY=:0
ROS has a great open source ecosystem and support for Linux Operating system. For a beginner, it is better to get hands-on experience directly on a Linux machine as it is easier and you'll get good support for errors you encounter.
ROS does work on windows but it requires Windows Subsystem for Linux (WSL), which is a compatibility layer which allows running a whole bunch of Linux binaries natively on Windows 10. With the advent of the Windows 10 Creators Update, the WSL was heavily updated and now is able to run ROS lunar and melodic.
You will also need to install BASH shell on your windows 10 machine.
Follow this article by Microsoft for installing WSL and BASH : install WSL on windows
Then follow this great article by janbernloehr : https://janbernloehr.de/2017/06/10/ros-windows
This is the same problem discussed in
Cannot connect to X server using docker on OS X - Part II
but never resolved.
In MacOS El Capitan, I'm running the OpenFOAM binary under Docker as there is no native version. I want to use paraView to view results. Cannot run the paraView supplied inside OpenFOAM since I get
paraview: cannot connect to X server
The advice here
Cannot connect to X server using docker on OSX
is to install paraView separately and run it from a normal terminal. This did not work as a normal terminal cannot "see" Docker files. And I cannot run the suggested
open -a paraview foam.foam
inside the docker terminal, as for some reason it does not recognize the "open" command.
Perhaps some Docker expert can help?
The team at OpenFOAM.org worked a lot on the issue recently to release a good solution to the MacOS users (http://openfoam.org/download/4-1-macos/).
Unfortunately, they reached the conclusion that going through X in Docker although working was not a solution because it freezes most of the time and it is really not convenient.
I understand from the question that the files cannot be seen from the MacOS terminal (that would require to know which version has been used). In the release of OpenFOAM 4.1 (see link above) in Docker this is done by the script and therefore it is directly possible to access the file by opening them with ParaView in a regular terminal.
I'm trying to get Erlang working on my Fedora server, specifically to run rabbitmq, but when I yum install erlang yum complains that wxGTK requires a bunch of packages.
Wtf? Why is erlang trying to install a GUI? I intend to deploy this on a headless server.
Do I need to compile erlang from source? Is there no GUI-less version of erlang I can use?
I like to use the kurl script created by the folk at Basho to install Erlang. It works very well on ubuntu. I hope this will be ok on Fedora too.
This will actually automatically download the source code, and compile it. If you dont have Wx installed, it will not compile this library and will work perfectly without (as long as you dont use tools which need it, of course)
I guess by default your erlang installation has wxErlang enabled and so those packages are required for installation.
On https://github.com/erlang/otp/wiki/Installation you can find instructions on how to manually install Erlang/OTP.
In the configure part you can disable the wxErlang part. Usually no extra config is required since the wxErlang-support will be disabled by default when the required packages are not installed.
So, I thought I'd create a bonafide release to run my next application in. Unfortunately, there seems to be a deal breaker.
First I tried making a project from scratch using this guide:
http://alancastro.org/2010/05/01/erlang-application-management-with-rebar.html
That failed with an obscure error, so just to make sure, I tried to run a project I know is good, etorrent.
When I tried to run etorrent's release, I got the same error:
[me#my-ip etorrent]# rel/etorrent/bin/etorrent console
Exec: /root/etorrent/rel/etorrent/erts-5.8.4/bin/erlexec -boot /root/etorrent/rel/etorrent/releases/1.2.1/etorrent -embedded -config /root/etorrent/rel/etorrent/etc/app.config -args_file /root/etorrent/rel/etorrent/etc/vm.args -- console
Root: /root/etorrent/rel/etorrent
pthread/ethr_event.c:98: Fatal error in wait__(): Function not implemented (38)
Aborted
I searched for that error, and the serps are filled with references to RabbitMQ on CentOS having the same problem. Obviously, it's more general than a RabbitMQ problem specifically. Based on this thread:
RabbitMQ install issue on Centos 5.5
...and my own experience, it seems like running releases on 14 series erlang installations coupled with series 5 CentOS doesn't work. I installed the latest erlang up on the site last night, by the way, so that's what I'm using. I didn't pass any flags to 'configure', just used the stock options.
Does anyone have any idea if there's a compile option for erlang that might fix this? Or any other advice? Is anyone else successfully using rebar created releases for applications in this environment?
Seems to be a problem that needed to be solved on the CentOS side if you look at this comment to this RabbitMQ install issue on Centos 5.5 answer
Compilation of Erlang R14B03 (erts-5.8.4) works on CentOS 5.6 (Final)
VirtualBox VM
So it looks to me that you need to upgrade your CentOS to 5.6