I am using gentoo linux. When I input, /etc/init.d/xend start, system replies /etc/init.d/xend: /usr/sbin/xend: /usr/lib/portage/pym: bad interpreter: Permission denied /etc/init.d/xend: /usr/sbin/xend: /usr/lib/portage/pym: bad interpreter: Permission denied ./etc/init.d/xend: /usr/sbin/xend: /usr/lib/portage/pym: bad interpreter: Permission denied ./etc/init.d/xend: /usr/sbin/xend: /usr/lib/portage/pym: bad interpreter: Permission denied ./etc/init.d/xend: /usr/sbin/xend: /usr/lib/portage/pym: bad interpreter: Permission denied ./etc/init.d/xend: /usr/sbin/xend: /usr/lib/portage/pym: bad interpreter: Permission denied ./etc/init.d/xend: /usr/sbin/xend: /usr/lib/portage/pym: bad interpreter: Permission denied ./etc/init.d/xend: /usr/sbin/xend: /usr/lib/portage/pym: bad interpreter: Permission denied ./etc/init.d/xend: /usr/sbin/xend: /usr/lib/portage/pym: bad interpreter: Permission denied ./etc/init.d/xend: /usr/sbin/xend: /usr/lib/portage/pym: bad interpreter: Permission denied ./etc/init.d/xend: /usr/sbin/xend: /usr/lib/portage/pym: bad interpreter: Permission denied I am searching internet by google, but I can''t find a method. Someone have any ideas How can I fix this problem? Thank you. _______________________________________________ Xen-users mailing list Xen-users@lists.xen.org http://lists.xen.org/xen-users
On Fri, 29 Mar 2013 02:45:11 +0900 이영준 wrote:> I am using gentoo linux. > > When I input, /etc/init.d/xend start, system replies > /etc/init.d/xend: /usr/sbin/xend: /usr/lib/portage/pym: bad > interpreter: Permission denied > /etc/init.d/xend: /usr/sbin/xend: /usr/lib/portage/pym: bad > interpreter: Permission denied > ./etc/init.d/xend: /usr/sbin/xend: /usr/lib/portage/pym: bad > interpreter: Permission denied > ./etc/init.d/xend: /usr/sbin/xend: /usr/lib/portage/pym: bad > interpreter: Permission denied > ./etc/init.d/xend: /usr/sbin/xend: /usr/lib/portage/pym: bad > interpreter: Permission denied > ./etc/init.d/xend: /usr/sbin/xend: /usr/lib/portage/pym: bad > interpreter: Permission denied > ./etc/init.d/xend: /usr/sbin/xend: /usr/lib/portage/pym: bad > interpreter: Permission denied > ./etc/init.d/xend: /usr/sbin/xend: /usr/lib/portage/pym: bad > interpreter: Permission denied > ./etc/init.d/xend: /usr/sbin/xend: /usr/lib/portage/pym: bad > interpreter: Permission denied > ./etc/init.d/xend: /usr/sbin/xend: /usr/lib/portage/pym: bad > interpreter: Permission denied > ./etc/init.d/xend: /usr/sbin/xend: /usr/lib/portage/pym: bad > interpreter: Permission denied > I am searching internet by google, but I can't find a method. > Someone have any ideas How can I fix this problem? >'xend' is a python script. The first line should be something like: #!<shell> which is called a shebang[1]. Example: #!/usr/bin/python It would seem the ebuild has replaced it with something invalid. Can you give us the output of: $ head -n 5 /usr/sbin/xend [1] https://en.wikipedia.org/wiki/Shebang_(Unix) -- Mihai Donțu _______________________________________________ Xen-users mailing list Xen-users@lists.xen.org http://lists.xen.org/xen-users
At 18:45 28.03.2013, you wrote:>I am using gentoo linux. > >When I input, /etc/init.d/xend start, system replies >/etc/init.d/xend: /usr/sbin/xend: /usr/lib/portage/pym: bad >interpreter: Permission deniedlike Mihai said: please post the output of # head -n 5 /usr/sbin/xend In my gentoo-system this is: xen ~ # head -n 5 /usr/sbin/xend #!/usr/bin/python2.7 # -*- mode: python; -*- #===========================================================================# Copyright (C) 2004 Mike Wray <mike.wray@hp.com> # Copyright (C) 2005-2006 XenSource Inc So please also send the output of # ll /usr/bin/python* and # eselect python list # revdep-rebuild might fix the problem. I guess, you changed your python-version recently. Christian -- Markt-Apotheke Christian Holpert e.K., Mömbris http://www.marktapotheke.org - info@marktapotheke.org http://www.blue-essentials-shop.de - info@blue-essentials-shop.de Apotheker Christian Holpert Im Markthof 5 63776 Mömbris Tel.: 06029-1379 Fax: 9986589 Amtsgericht Aschaffenburg, HR.A, Registernummer 2165
> At 18:45 28.03.2013, you wrote: > > I am using gentoo linux. > > When I input, /etc/init.d/xend start, system replies > > /etc/init.d/xend: /usr/sbin/xend: /usr/lib/portage/pym: bad > interpreter: Permission denied > > like Mihai said: please post the output of # head -n 5 /usr/sbin/xend > In my gentoo-system this is: xen ~ # head -n 5 /usr/sbin/xend > #!/usr/bin/python2.7 # -*- mode: python; -*- > #===========================================================================> # Copyright (C) 2004 Mike Wray <mike.wray@xxxxxx> # Copyright (C) > 2005-2006 XenSource Inc So please also send the output of # ll > /usr/bin/python* and # eselect python list # revdep-rebuild might fix > the problem. I guess, you changed your python-version recently. > Christian -- Markt-Apotheke Christian Holpert e.K., Mo"mbris > http://www.marktapotheke.org <http://www.marktapotheke.org/> - > info@xxxxxxxxxxxxxxxxx http://www.blue-essentials-shop.de > <http://www.blue-essentials-shop.de/> - info@xxxxxxxxxxxxxxxxxxxxxxx > Apotheker Christian Holpert Im Markthof 5 63776 Mo"mbris Tel.: > 06029-1379 Fax: 9986589 Amtsgericht Aschaffenburg, HR.A, > Registernummer 2165Hello. This is my xend scripts contents. This file is built by next command. 1. ./configure 2. make world -j8 3. make install Thank you. #!/usr/lib/portage/pym # -*- mode: python; -*- #===========================================================================# Copyright (C) 2004 Mike Wray <mike.wray@hp.com> # Copyright (C) 2005-2006 XenSource Inc #=========================================================================== """Xen management daemon. Provides console server and HTTP management api. Run: xend start Restart: xend restart The daemon is stopped with: xend stop The daemon should reconnect to device control interfaces and recover its state when restarted. On Solaris, the daemons are SMF managed, and you should not attempt to start xend by hand. """ import fcntl import glob import os import os.path import sys import socket import signal import time import commands from xen.xend.server import SrvDaemon class CheckError(ValueError): pass def hline(): print >>sys.stderr, "*" * 70 def msg(message): print >>sys.stderr, "*" * 3, message def check_logging(): """Check python logging is installed and raise an error if not. Logging is standard from Python 2.3 on. """ try: import logging except ImportError: hline() msg("Python logging is not installed.") msg("Use ''make install-logging'' at the xen root to install.") msg("") msg("Alternatively download and install from") msg("http://www.red-dove.com/python_logging.html") hline() raise CheckError("logging is not installed") def check_user(): """Check that the effective user id is 0 (root). """ if os.geteuid() != 0: hline() msg("Xend must be run as root.") hline() raise CheckError("invalid user") def start_daemon(daemon, *args): if os.fork() == 0: os.execvp(daemon, (daemon,) + args) def start_blktapctrl(): start_daemon("blktapctrl", "") def main(): try: check_logging() check_user() except CheckError: sys.exit(1) daemon = SrvDaemon.instance() if not sys.argv[1:]: print ''usage: %s {start|stop|reload|restart}'' % sys.argv[0] elif sys.argv[1] == ''start'': if os.uname()[0] != "SunOS": start_blktapctrl() return daemon.start() elif sys.argv[1] == ''trace_start'': start_blktapctrl() return daemon.start(trace=1) elif sys.argv[1] == ''stop'': return daemon.stop() elif sys.argv[1] == ''reload'': return daemon.reloadConfig() elif sys.argv[1] == ''restart'': start_blktapctrl() return daemon.stop() or daemon.start() elif sys.argv[1] == ''status'': return daemon.status() else: print ''not an option:'', sys.argv[1] return 1 if __name__ == ''__main__'': sys.exit(main()) _______________________________________________ Xen-users mailing list Xen-users@lists.xen.org http://lists.xen.org/xen-users
Good Morning, At 14:02 29.03.2013, you wrote:>#!/usr/lib/portage/pymIn my case this points to a directory, not a file: xen ~ # ll /usr/lib/portage/ insgesamt 32 drwxr-xr-x 4 root root 4096 10. Dez 05:43 . drwxr-xr-x 35 root root 20480 11. Mär 23:24 .. drwxr-xr-x 3 root root 4096 4. Mär 08:39 bin drwxr-xr-x 5 root root 4096 10. Dez 05:43 pym A directory is a ''bad interpreter'' in my eyes. Try changing the path to>#!/usr/bin/python2.7or whatever python interpreter exists. It seems you build your xen-system from source. Alternatively I would suggest emerging xen and xentools. This might avoid your problem. Christian -- Markt-Apotheke Christian Holpert e.K., Mömbris http://www.marktapotheke.org - info@marktapotheke.org http://www.blue-essentials-shop.de - info@blue-essentials-shop.de Apotheker Christian Holpert Im Markthof 5 63776 Mömbris Tel.: 06029-1379 Fax: 9986589 Amtsgericht Aschaffenburg, HR.A, Registernummer 2165