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

6

16

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.

Separatrix answered 14/12, 2019 at 14:43 Comment(0)
E
30

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 :)

Ehlke answered 16/12, 2020 at 21:6 Comment(1)
Thank you, it is very usefull in my case!Listen
L
17

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.

Lolita answered 24/2, 2020 at 6:59 Comment(1)
thank you very much, this was a very frustrating problem I had and your solution solved it.Dwinnell
B
1
  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

Bamford answered 29/8, 2020 at 4:26 Comment(0)
U
1

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.

Unread answered 22/11, 2022 at 6:15 Comment(0)
S
0

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

Symons answered 2/1, 2023 at 19:12 Comment(0)
S
-4

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

Shirty answered 14/12, 2019 at 15:3 Comment(3)
what a bummer I don't like Microsoft too much. But on the other hand I do need c# so I guess I have to compromiseSeparatrix
I feel ya :/ I'm not a fan of Microsoft eitherShirty
"do not use" is opinion based and doesn't address the underlying issue no more or less than saying "do not use windows" or "do not use Linux"Vicinal

© 2022 - 2024 — McMap. All rights reserved.