GithubHelp home page GithubHelp logo

Comments (15)

NickVolynkin avatar NickVolynkin commented on May 15, 2024 8

Heh, I've overlooked the problem. I've got bsdtar, while GNU tar is required. So, brew install gnu-tar solved the problem.

from ansible-role-zsh.

popstas avatar popstas commented on May 15, 2024 3

I think that role should be provisioned on clean macOS only with brew installed, but I don't tested it on clean macOS... So you can add brew install gnu-tar and/or brew install fzf to role.

from ansible-role-zsh.

gaizeror avatar gaizeror commented on May 15, 2024 2

It is not working because the unarchive module uses /usr/bin/tar and installing gnu-tar does not replace the symlink of tar from bsdtar to gnu-tar

from ansible-role-zsh.

cueedee avatar cueedee commented on May 15, 2024 1

To aid any future dwellers who like me landed here when looking for an answer to:

Command /usr/bin/tar could not handle archive: Unable to list files in the archive: /usr/bin/tar: You may not specify more than one -Acdtrux, --delete or --test-label option

In my case the cause turned out to be a mere typo in the extra_opts resulting in a command line option that tar didn't grok.

Similarly, I suspect that the -xz that @kenorb included in their extra_opts could have been the cause for failure if the xz utility needed for this option wasn't installed.

from ansible-role-zsh.

NickVolynkin avatar NickVolynkin commented on May 15, 2024

Still not sure if this should be handled in the role.

from ansible-role-zsh.

popstas avatar popstas commented on May 15, 2024

@gaizeror, just replace symlink yourself.

from ansible-role-zsh.

gaizeror avatar gaizeror commented on May 15, 2024

@popstas I am new to macOS, but I get permissions denied (also with sudo)

from ansible-role-zsh.

popstas avatar popstas commented on May 15, 2024

@gaizeror, try to become root with sudo -i

from ansible-role-zsh.

gaizeror avatar gaizeror commented on May 15, 2024

I tried, so wierd root cant change symlink

from ansible-role-zsh.

cupen avatar cupen commented on May 15, 2024

I meet the same problem in my CentOS7, but I have both the /bin/gtar and /bin/unzip.
The odd thing was it works in my Debian9, This is both funny and annoying ……
Then I find this.

$ tar xvf /home/cupen/.ansible/tmp/ansible-tmp-1523707936.0375483-68992850281293/source
tar (child): cannot run bzip2: No such file or directory
tar (child): trying lbzip2
tar (child): lbzip2: Cannot exec: No such file or directory
tar (child): Error is not recoverable: exiting now
tar: Child returned status 2
tar: Error is not recoverable: exiting now

HOLY SHIT ! OK, run yum install bzip2, then it works.

from ansible-role-zsh.

gaizeror avatar gaizeror commented on May 15, 2024

I installed manually fzf with
brew install fzf

from ansible-role-zsh.

AjaxOdessa avatar AjaxOdessa commented on May 15, 2024

@gaizeror Inability to edit /usr/bin on macOS is the result of SIP. Once it is disabled (requires restart & Recovery partition), you can make changes you need.

from ansible-role-zsh.

kenorb avatar kenorb commented on May 15, 2024

Got similar error on Ubuntu 22.04:

"msg": "Failed to find handler for \"/tmp/site.tar.gz\". Make sure the required command to extract the file is installed. Command \"/usr/bin/unzip\" could not handle archive. Command \"/usr/bin/tar\" could not handle archive."
      - name: Extract site
        ansible.builtin.unarchive:
          src: /tmp/site.tar.gz
          dest: /var/www/html
          owner: root
          group: root
          mode: '0755'
          remote_src: yes
          extra_opts: "--no-same-owner --no-same-permissions -xz"
$ ansible --version
ansible 2.10.8
  config file = None
  configured module search path = ['/var/lib/jenkins/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python3/dist-packages/ansible
  executable location = /usr/bin/ansible
  python version = 3.10.6 (main, May 29 2023, 11:10:38) [GCC 11.3.0]

$ tar --version
tar (GNU tar) 1.34

$ unzip --version
caution:  both -n and -o specified; ignoring -o
UnZip 6.00 of 20 April 2009, by Debian. Original by Info-ZIP.

from ansible-role-zsh.

popstas avatar popstas commented on May 15, 2024

@kenorb , is it relative to project ansible-role-zsh?

from ansible-role-zsh.

kenorb avatar kenorb commented on May 15, 2024

Is it relative to project ansible-role-zsh?

It is vanilla Ansible, sorry. But the issue could be related.

from ansible-role-zsh.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.