user12536783
user12536783

Reputation:

Error when trying to run code: Debugger operation failed, Native error= Cannot find the specified file

I recently completely transitioned to Linux but struggle to find a good way to code in C#. I discovered Monodevelop which looks similar to Visual Studio, but whenever I try to run any code I get this error ( I run pop! _os if it matters):

Debugger operation failed
ApplicationName='/usr/lib/gnome-terminal/gnome-terminal-server', CommandLine='--app-id mono.develop.id1f71c1c4cede406e9ae6cc55355f30e2', CurrentDirectory='', Native error= Cannot find the specified file

It might have something to do with the path of the terminal but I don't know how to fix it. I know it's a Linux specific thing but I didn't know better than to post it here.

Upvotes: 16

Views: 9409

Answers (6)

Oleksa
Oleksa

Reputation: 21

For me this works:

  1. cd /usr/lib/
  2. sudo mkdir gnome-terminal
  3. cp -r ./gnome-terminal-server ./gnome-terminal

And if you concern about memory garbage on your laptop you can run following commands as well:

  1. cd ../
  2. sudo rm gnome-terminal-server

That commands are useful cause you copied gnome-terminal-server to gnome-terminal folder

Upvotes: 0

Jakobitz
Jakobitz

Reputation: 81

I received this error with no further explanation. The above solution didn't work unfortunately but I did find a setting that at least let me run my application with a debugger so I thought I would share it here.

If you go to Run Configurations under your project settings and uncheck Run on external console, you will be able to run your code.

Upvotes: 1

SCOVICH LeRusse
SCOVICH LeRusse

Reputation: 301

i have seen this error when i'm running my console program (c#) on monodevelop on kali : "ApplicationName='/usr/lib/gnome-terminal/gnome-terminal-server', CommandLine='--app-id mono.develop.id0771a7bfd5a6445f82d97a8fe5fc4abc', CurrentDirectory='', Native error= Cannot find the specified file"

I have solved it using this script on terminal :

  1. cd /usr/lib
  2. sudo mkdir gnome-terminal
  3. cd gnome-terminal
  4. sudo ln -s /usr/libexec/gnome-terminal-server

Make this, it will be done; and now run again your program and enjoy :)

Upvotes: 30

Renan
Renan

Reputation: 11

  1. Open the lib folder. Click on the arrow pointing down, next to the word lib, on top, and click open on the terminal.

  2. Type sudo mkdir gnome-terminal

  3. sudo ln -s /usr/libexec/gnome-terminal-server

Upvotes: 1

Kayky de Brito
Kayky de Brito

Reputation: 298

Also had this same error. This happens because /usr/lib/gnome-terminal/gnome-terminal-server is actually /usr/libexec/gnome-terminal-server, and MonoDevelop is still using the old path.

The way I fixed it was to create the /usr/lib/gnome-terminal directory and adding a symbolic link with sudo ln -s /usr/libexec/gnome-terminal-server inside /usr/lib/gnome-terminal.

Upvotes: 17

BernardoPiedade
BernardoPiedade

Reputation: 27

I had that same error (which made me transition to Windows :c).

Do not use mono-develop to code c# in linux, simply install vscode and .net core for linux. Create a .net core project and open it with vscode. Trust me, it will save your life

Upvotes: -4

Related Questions