“[Errno 2]没有这样的文件或目录”在opensuse中构建包时

时间:2013-01-28 10:42:24

标签: opensuse

我只是设置了chroot环境,用于在opensuse中构建包。 对于chroot,我跟着http://blog.zenlinux.com/?p=428和其他一些来源。 用于构建包http://en.opensuse.org/openSUSE:Build_Service_Tutorial

我坚持运行osc来构建软件包:

# osc co server:database mysql-workbench
A    server:database
A    server:database/mysql-workbench
A    server:database/mysql-workbench/mysql-workbench-gpl-5.2.44-avoid-version.patch
A    server:database/mysql-workbench/mysql-workbench-gpl-5.2.44-ctemplate-fix.patch
A    server:database/mysql-workbench/mysql-workbench-gpl-5.2.45-src.tar.gz
A    server:database/mysql-workbench/mysql-workbench.changes
A    server:database/mysql-workbench/mysql-workbench.spec
A    server:database/mysql-workbench/openSUSE_(Vendor_Package).xml
At revision 43cda63b296f40fa371cdb52a8e957d2.

# cd server:database/mysql-workbench
# osc -vt build openSUSE_12.2 x86_64 mysql-workbench.spec 
makeurl: https://api.opensuse.org ['source', 'server:database', '_meta'] []
makeurl: https://api.opensuse.org ['source', 'server:database', 'mysql-workbench'] cmd=getprojectservices
Run source service: /usr/lib/obs/service/format_spec_file --outdir /tmp/tmprT4XTU
Run source service: /usr/lib/obs/service/source_validator --outdir /tmp/tmp_tAFQr
Building mysql-workbench.spec for openSUSE_12.2/x86_64
Getting buildinfo from server and store to /root/repo/server:database/mysql-workbench/.osc/_buildinfo-openSUSE_12.2-x86_64.xml
makeurl: https://api.opensuse.org ['build', 'server:database', 'openSUSE_12.2', 'x86_64', 'mysql-workbench', '_buildinfo'] ['add=vim', 'add=gdb', 'add=strace', 'add=valgrind']
Getting buildconfig from server and store to /root/repo/server:database/mysql-workbench/.osc/_buildconfig-openSUSE_12.2-x86_64
makeurl: https://api.opensuse.org ['build', 'server:database', 'openSUSE_12.2', '_buildconfig'] []
Updating cache of required packages
0.0% cache miss. 421/421 dependencies cached.

makeurl: https://api.opensuse.org ['source', 'server:database', '_pubkey'] []
makeurl: https://api.opensuse.org ['source', 'openSUSE:12.2', '_pubkey'] []
Verifying integrity of cached packages
using keys from server:database, openSUSE:12.2
Writing build configuration
Running build
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/osc/babysitter.py", line 53, in run
    return prg.main()
  File "/usr/lib/python2.7/site-packages/osc/cmdln.py", line 310, in main
    return self.cmd(args)
  File "/usr/lib/python2.7/site-packages/osc/cmdln.py", line 333, in cmd
    retval = self.onecmd(argv)
  File "/usr/lib/python2.7/site-packages/osc/cmdln.py", line 449, in onecmd
    return self._dispatch_cmd(handler, argv)
  File "/usr/lib/python2.7/site-packages/osc/cmdln.py", line 1179, in _dispatch_cmd
    return handler(argv[0], opts, *args)
  File "/usr/lib/python2.7/site-packages/osc/commandline.py", line 5201, in do_build
    return osc.build.main(self.get_api_url(), opts, args)
  File "/usr/lib/python2.7/site-packages/osc/build.py", line 914, in main
    rc = subprocess.call(cmd)
  File "/usr/lib64/python2.7/subprocess.py", line 493, in call
    return Popen(*popenargs, **kwargs).wait()
  File "/usr/lib64/python2.7/subprocess.py", line 679, in __init__
    errread, errwrite)
  File "/usr/lib64/python2.7/subprocess.py", line 1249, in _execute_child
    raise child_exception
OSError: [Errno 2] No such file or directory
[Errno 2] No such file or directory

知道为什么我会收到“没有这样的文件或目录”吗?或者任何提示如何调试?

2 个答案:

答案 0 :(得分:0)

看起来你可能会遗漏/usr/bin/build,这是在chroot中实际运行rpmbuild的程序。它位于名为build的包中。

答案 1 :(得分:0)

问题遗失sudo

我直接向开发人员询问关于此问题的开发人员,经过一些调查后我们发现我失踪了sudo。他们已经同意osc应该更准确地说错过sudo,所以这可能已经修复了osc个新版本。