Results 1 to 2 of 2

Thread: mkosi opensuse failed on Ubuntu

  1. #1

    Question mkosi opensuse failed on Ubuntu

    Hello Community,

    I need some help with the following case.
    I try to create a opensuse Leap 15 image with mkosi ( OpenSuse Leap 15 ) on a Ubuntu OS:

    Does anybody did this before and is there a description on that?

    Here is the configuration:

    my base imags is Ubuntu:
    Ubuntu 18.04.1 LTS \n \l
    this is the mkosi configuration

    vim /var/tmp/machines/opensuse15-base.mkosi
    Packages=libnss-resolve wget gnupg ca-certificates

    this is the error while creating

    python3 /home/testuser/code-repositories/public/systemd/mkosi/mkosi --default=/var/tmp/machines/opensuse15-base.mkosi
              Distribution: opensuse
                   Release: 15
             Output Format: directory
                    Output: /var/tmp/machines/opensuse-base
           Output Checksum: n/a
          Output Signature: n/a
               Output Bmap: n/a
    Output nspawn Settings: n/a
               Incremental: no
                Encryption: no
                    Verity: no
                  Packages: none
             Package Cache: none
               Extra Trees: none
            Skeleton Trees: none
              Build Script: none
             Build Sources: /var/tmp/machines
           Build Directory: none
            Build Packages: none
        Postinstall Script: none
      Scripts with network: no
           nspawn Settings: none
        Extra search paths: none
    ‣ Detaching namespace...
    ‣ Detaching namespace complete.
    ‣ Setting up package cache...
    ‣ Setting up package cache /var/tmp/machines/.mkosi-yyrtyhd0 complete.
    ‣ Setting up temporary workspace.
    ‣ Temporary workspace in /var/tmp/machines/.mkosi-a3xbgba5 is now set up.
    ‣ Setting up basic OS tree...
    ‣ Setting up basic OS tree complete.
    ‣ Mounting Package Cache...
    ‣ Mounting Package Cache complete.
    ‣ Installing openSUSE...
    ‣ Unmounting Package Cache...
    ‣ Unmounting Package Cache complete.
    Traceback (most recent call last):
      File "/home/mkoenig/code-repositories/public/systemd/mkosi/mkosi", line 3745, in <module>
      File "/home/mkoenig/code-repositories/public/systemd/mkosi/mkosi", line 3735, in main
      File "/home/mkoenig/code-repositories/public/systemd/mkosi/mkosi", line 3585, in build_stuff
        raw, tar, root_hash = build_image(args, workspace, run_build_script=False)
      File "/home/mkoenig/code-repositories/public/systemd/mkosi/mkosi", line 3434, in build_image
        install_distribution(args,, run_build_script, cached)
      File "/home/mkoenig/code-repositories/public/systemd/mkosi/mkosi", line 1639, in install_distribution
        install[args.distribution](args, workspace, run_build_script)
      File "/usr/lib/python3.6/", line 52, in inner
        return func(*args, **kwds)
      File "/home/mkoenig/code-repositories/public/systemd/mkosi/mkosi", line 1565, in install_opensuse
        run(["zypper", "--root", root, "addrepo", "-ck", release_url, "Main"], check=True)
      File "/usr/lib/python3.6/", line 403, in run
        with Popen(*popenargs, **kwargs) as process:
      File "/usr/lib/python3.6/", line 709, in __init__
        restore_signals, start_new_session)
      File "/usr/lib/python3.6/", line 1344, in _execute_child
        raise child_exception_type(errno_num, err_msg, err_filename)
    FileNotFoundError: [Errno 2] No such file or directory: 'zypper': 'zypper'

    found this documentation about mkosi with the following statement:

    Note that mkosi is distribution-agnostic. It currently can build images based on the following Linux distributions:

    1. Fedora
    2. Debian
    3. Ubuntu
    4. ArchLinux
    5. openSUSE
    Does anybody did this before and is there a description on that?

    Thank you all

  2. #2
    Join Date
    Jun 2008
    San Diego, Ca, USA
    Blog Entries

    Default Re: mkosi opensuse failed on Ubuntu

    Your error looks like it's specific to the mkosi you installed or our config files are created incorrectly(Although I haven't used mkosi personally, I don't see any obvious errors in what you posted).
    For some reason "zypper" is being interpreted as a location (file or folder) instead of as a command.

    You might try passing your parameters as command line options instead of using configuration files.

    If the Ubuntu package might be faulty, it's recommended to install from the Github source

    For instructions and documentation, besides the MAN pages which is typically difficult to read, there is also the Arch Wiki

    Beginner Wiki Quickstart -
    Solved a problem recently? Create a wiki page for future personal reference!
    Learn something new?
    Attended a computing event?
    Post and Share!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts