简体   繁体   中英

How to run a binary executable file in linux terminal

I have a executable file and when I double-click it, it works OK. but when I use terminal and type ./paraview it gives me this error message:

Segmentation fault(Core dumped)

How to run paraview in terminal?

Whatever is going on here is specific to this paraview program and not especially related to the Linux shell. I don't know exactly what you're double-clicking on, but it could be a shortcut that includes specific command-line arguments, a specific working directory, etc. It could also be that the way you're running a terminal causes it to have different environment variables set or something.

At any rate, a program shouldn't just crash by segfaulting when it's run in a way it doesn't expect, so this would definitely count as a bug in paraview.

To know more about what the program is doing and why failing you could use strace . based on your distro you could install it by using: apt-get install strace or yum install strace

Then give a try to this:

strace -f ./paraview

The option -f is to trace child processes, it will help to get more info and hopefully find the root cause of the problem.

The problem arises from some permission issues. You will notice that if you are in PATH_TO_PARAVIEW_DIR/bin , try

sudo PATH_TO_PARAVIEW_DIR/bin/paraview

This should work.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM