Can't run simple script in Linux

Hi,

I installed PyCharm in Ubuntu 10.04 64 bit edition with the Sun JDK.  I created a new project and a simple script with "print 'hello'" in it.  When I try to run it I see the following exception below if I'm running pycharm.sh from the command line.  The JDK is the one I got through the Ubuntu Software Center.  I have PYCHARM_JDK set to /usr/lib/jvm/java-6-sun, which is a symlink to where the JDK is installed by Ubuntu.

Any idea what's going on?  Do I need a different JDK?  Is 64 bit a problem?

Let me know if there's any other information that would be useful.

Thanks!

Steve

Java HotSpot(TM) 64-Bit Server VM (build 17.1-b03, mixed mode)
[  11731]  ERROR - com.intellij.ide.IdeEventQueue - Error during dispatching of java.awt.event.MouseEvent[MOUSE_RELEASED,(461,43),absolute(572,73),button=1,modifiers=Button1,clickCount=1] on frame0
java.lang.UnsatisfiedLinkError: /tmp/jna448377414575165467.tmp: /tmp/jna448377414575165467.tmp: failed to map segment from shared object: Operation not permitted
    at java.lang.ClassLoader$NativeLibrary.load(Native Method)
    at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1803)
    at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1699)
    at java.lang.Runtime.load0(Runtime.java:770)
    at java.lang.System.load(System.java:1003)
    at com.sun.jna.Native.loadNativeLibraryFromJar(Native.java:756)
    at com.sun.jna.Native.loadNativeLibrary(Native.java:680)
    at com.sun.jna.Native.<clinit>(Native.java:108)
    at com.intellij.execution.process.RunnerMediator.<clinit>(RunnerMediator.java:184)
    at com.jetbrains.python.run.PythonProcessHandler.createProcessHandler(PythonProcessHandler.java:63)
    at com.jetbrains.python.run.PythonCommandLineState.doCreateProcess(PythonCommandLineState.java:104)
    at com.jetbrains.python.run.PythonCommandLineState.startProcess(PythonCommandLineState.java:88)
    at com.jetbrains.python.run.PythonCommandLineState.execute(PythonCommandLineState.java:57)
    at com.jetbrains.python.debugger.PyDebugRunner.doExecute(PyDebugRunner.java:60)
    at com.intellij.execution.runners.GenericProgramRunner$1.execute(GenericProgramRunner.java:85)
    at com.intellij.execution.impl.ExecutionManagerImpl$2.run(ExecutionManagerImpl.java:157)
    at com.intellij.execution.impl.ExecutionManagerImpl.compileAndRun(ExecutionManagerImpl.java:133)
    at com.intellij.execution.impl.ExecutionManagerImpl.startRunProfile(ExecutionManagerImpl.java:185)
    at com.intellij.execution.runners.GenericProgramRunner.execute(GenericProgramRunner.java:78)
    at com.intellij.execution.runners.GenericProgramRunner.execute(GenericProgramRunner.java:62)
    at com.intellij.execution.ProgramRunnerUtil.executeConfiguration(ProgramRunnerUtil.java:80)
    at com.intellij.execution.ExecutorRegistryImpl$ExecutorAction.actionPerformed(ExecutorRegistryImpl.java:229)
    at com.intellij.openapi.actionSystem.impl.ActionButton.a(ActionButton.java:153)
    at com.intellij.openapi.actionSystem.impl.ActionButton.a(ActionButton.java:129)
    at com.intellij.openapi.actionSystem.impl.ActionButton.processMouseEvent(ActionButton.java:289)
    at java.awt.Component.processEvent(Component.java:6032)
    at java.awt.Container.processEvent(Container.java:2041)
    at java.awt.Component.dispatchEventImpl(Component.java:4630)
    at java.awt.Container.dispatchEventImpl(Container.java:2099)
    at java.awt.Component.dispatchEvent(Component.java:4460)
    at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4577)
    at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4238)
    at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4168)
    at java.awt.Container.dispatchEventImpl(Container.java:2085)
    at java.awt.Window.dispatchEventImpl(Window.java:2478)
    at java.awt.Component.dispatchEvent(Component.java:4460)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
    at com.intellij.ide.IdeEventQueue.f(IdeEventQueue.java:628)
    at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:505)
    at com.intellij.ide.IdeEventQueue.b(IdeEventQueue.java:406)
    at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:370)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
[  11733]  ERROR - com.intellij.ide.IdeEventQueue - PyCharm 1.0  Build #PY-97.31
[  11733]  ERROR - com.intellij.ide.IdeEventQueue - JDK: 1.6.0_22
[  11733]  ERROR - com.intellij.ide.IdeEventQueue - VM: Java HotSpot(TM) 64-Bit Server VM
[  11733]  ERROR - com.intellij.ide.IdeEventQueue - Vendor: Sun Microsystems Inc.
[  11733]  ERROR - com.intellij.ide.IdeEventQueue - OS: Linux
[  11733]  ERROR - com.intellij.ide.IdeEventQueue - Last Action: Debug

1 comment

Hello Steve,

This problem happens because your /tmp directory is mounted with the noexec

option. You probably need to modify pycharm.sh and add a line to set the

TMP environment variable to a directory which is not mounted as noexec.

I installed PyCharm in Ubuntu 10.04 64 bit edition with the Sun JDK.

I created a new project and a simple script with "print 'hello'" in

it.  When I try to run it I see the following exception below if I'm

running pycharm.sh from the command line.  The JDK is the one I got

through the Ubuntu Software Center.  I have PYCHARM_JDK set to

/usr/lib/jvm/java-6-sun, which is a symlink to where the JDK is

installed by Ubuntu.

Any idea what's going on?  Do I need a different JDK?  Is 64 bit a

problem?

Let me know if there's any other information that would be useful.

Thanks!

Steve

Java HotSpot(TM) 64-Bit Server VM (build 17.1-b03, mixed mode)

  ERROR - com.intellij.ide.IdeEventQueue - Error during

dispatching of

java.awt.event.MouseEvent[MOUSE_RELEASED,(461,43),absolute(572,73),but

ton=1,modifiers=Button1,clickCount=1] on frame0

java.lang.UnsatisfiedLinkError: /tmp/jna448377414575165467.tmp:

/tmp/jna448377414575165467.tmp: failed to map segment from shared

object: Operation not permitted

at java.lang.ClassLoader$NativeLibrary.load(Native Method)

at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1803)

at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1699)

at java.lang.Runtime.load0(Runtime.java:770)

at java.lang.System.load(System.java:1003)

at com.sun.jna.Native.loadNativeLibraryFromJar(Native.java:756)

at com.sun.jna.Native.loadNativeLibrary(Native.java:680)

at com.sun.jna.Native.<clinit>(Native.java:108)

at

com.intellij.execution.process.RunnerMediator.<clinit>(RunnerMediator.

java:184)

at

com.jetbrains.python.run.PythonProcessHandler.createProcessHandler(Pyt

honProcessHandler.java:63)

at

com.jetbrains.python.run.PythonCommandLineState.doCreateProcess(Python

CommandLineState.java:104)

at

com.jetbrains.python.run.PythonCommandLineState.startProcess(PythonCom

mandLineState.java:88)

at

com.jetbrains.python.run.PythonCommandLineState.execute(PythonCommandL

ineState.java:57)

at

com.jetbrains.python.debugger.PyDebugRunner.doExecute(PyDebugRunner.ja

va:60)

at

com.intellij.execution.runners.GenericProgramRunner$1.execute(GenericP

rogramRunner.java:85)

at

com.intellij.execution.impl.ExecutionManagerImpl$2.run(ExecutionManage

rImpl.java:157)

at

com.intellij.execution.impl.ExecutionManagerImpl.compileAndRun(Executi

onManagerImpl.java:133)

at

com.intellij.execution.impl.ExecutionManagerImpl.startRunProfile(Execu

tionManagerImpl.java:185)

at

com.intellij.execution.runners.GenericProgramRunner.execute(GenericPro

gramRunner.java:78)

at

com.intellij.execution.runners.GenericProgramRunner.execute(GenericPro

gramRunner.java:62)

at

com.intellij.execution.ProgramRunnerUtil.executeConfiguration(ProgramR

unnerUtil.java:80)

at

com.intellij.execution.ExecutorRegistryImpl$ExecutorAction.actionPerfo

rmed(ExecutorRegistryImpl.java:229)

at

com.intellij.openapi.actionSystem.impl.ActionButton.a(ActionButton.jav

a:153)

at

com.intellij.openapi.actionSystem.impl.ActionButton.a(ActionButton.jav

a:129)

at

com.intellij.openapi.actionSystem.impl.ActionButton.processMouseEvent(

ActionButton.java:289)

at java.awt.Component.processEvent(Component.java:6032)

at java.awt.Container.processEvent(Container.java:2041)

at java.awt.Component.dispatchEventImpl(Component.java:4630)

at java.awt.Container.dispatchEventImpl(Container.java:2099)

at java.awt.Component.dispatchEvent(Component.java:4460)

at

java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4577)

at

java.awt.LightweightDispatcher.processMouseEvent(Container.java:4238)

at

java.awt.LightweightDispatcher.dispatchEvent(Container.java:4168)

at java.awt.Container.dispatchEventImpl(Container.java:2085)

at java.awt.Window.dispatchEventImpl(Window.java:2478)

at java.awt.Component.dispatchEvent(Component.java:4460)

at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)

at com.intellij.ide.IdeEventQueue.f(IdeEventQueue.java:628)

at

com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:505)

at com.intellij.ide.IdeEventQueue.b(IdeEventQueue.java:406)

at

com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:370)

at

java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThrea

d.java:269)

at

java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.j

ava:184)

at

java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThrea

d.java:174)

at

java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)

at

java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)

at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)

  ERROR - com.intellij.ide.IdeEventQueue - PyCharm 1.0  Build

#PY-97.31

  ERROR - com.intellij.ide.IdeEventQueue - JDK: 1.6.0_22 [

11733]  ERROR - com.intellij.ide.IdeEventQueue - VM: Java HotSpot(TM)

64-Bit Server VM   ERROR - com.intellij.ide.IdeEventQueue -

Vendor: Sun Microsystems Inc.   ERROR -

com.intellij.ide.IdeEventQueue - OS: Linux   ERROR -

com.intellij.ide.IdeEventQueue - Last Action: Debug

---

Original message URL:

http://devnet.jetbrains.net/message/5276032#5276032

--

Dmitry Jemerov

Development Lead

JetBrains, Inc.

http://www.jetbrains.com/

"Develop with Pleasure!"

0

Please sign in to leave a comment.