简体   繁体   中英

Warning: Could not start program with arguments. Warning: Exec format error

Hello I'm trying to make a Shell script in opensuse to create MySqlUsers but when I try to run it I get this error:

Warning: Could not start program '/home/thomas/Scripts/MySqlCreateUser.sh' with arguments '/home/thomas/Scripts/MySqlCreateUser.sh'.

Warning: Exec format error

Any Idea what I can do?

I'm guessing you are trying to start this from a KDE menu item.

You need to make sure that:

  1. Your script has a proper shebang on the first line (like #!/bin/bash )
  2. Your script is executable ( chmod +x /home/thomas/Scripts/MySqlCreateUser.sh )

Grisha Levit 回答的附录:如果 .sh 文件只是一个“java -jar ...”,那么只需在 KDE 菜单编辑器中输入“java -jar ...”作为 cmd。

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