<#19281 BinaryNotFound: tar when packaging on 2.16...
# github-notifications
c
#19281 BinaryNotFound: tar when packaging on 2.16.0rc5 Issue created by bobthemighty Describe the bug I have an existing repository that builds successfully under 2.15.1. I've upgraded to 2.16.0rc5 so that I can use install_from_resolve. On my machine and the Github Actions pipeline,
pants package
fails:
Copy code
❯ pants  package ::
12:01:11.45 [ERROR] 1 Exception encountered:

Engine traceback:
  in `package` goal

BinaryNotFoundError: Cannot find `tar` on `['/bin', '/opt/homebrew/bin', '/usr/bin', '/usr/local/bin']`. Please ensure that it is installed so that Pants can download the tools Pants needs to run.


❯ which tar
/usr/bin/tar
Pants version 2.16.0rc5 OS Linux Debug Log ``` ❮ pants --no-dynamic-ui --level=debug package src/dz/ingestion:notifier 121606.36 [DEBUG] acquiring lock: <pants.pantsd.lock.OwnerPrintingInterProcessFileLock object at 0x7f91b50d4af0> 121606.36 [DEBUG] terminating pantsd 121606.36 [DEBUG] sending signal 15 to pid 3783451 121606.56 [DEBUG] successfully terminated pid 3783451 121606.56 [DEBUG] purging metadata directory: /home/bob/code/carbo/.pids/4110aad361b4/pantsd 121606.56 [DEBUG] Launching pantsd 121606.56 [DEBUG] purging metadata directory: /home/bob/code/carbo/.pids/4110aad361b4/pantsd 121606.56 [DEBUG] pantsd command is: PANTS_DAEMON_ENTRYPOINT=pants.pantsd.pants_daemon:launch_new_pantsd_instance PYTHONPATH=/home/bob/.cache/nce/6621291ed4120fa45607b367abf7786ce496f389f27240712a63c31f1c438c21/bindings/venvs/2.16.0rc4/bin/home/bob/.cache/nce/cdc3a4cfddcd63b6cebdd75b14970e02d8ef0ac5be4d350e57ab5df56c19e85e/cpython 3.9.15+20221106 x86 64 unknown linux gnu install only.tar.gz/python/lib/python39.zip/home/bob/.cache/nce/cdc3a4cfddcd63b6cebdd75b14970e02d8ef0ac5be4d350e57ab5df56c19e85e/cpython-3.9.15+20221106-x86_64-unknown-linux-gnu-install_only.tar.gz/python/lib/python3.9/home/bob/.cache/nce/cdc3a4cfddcd63b6cebdd75b14970e02d8ef0ac5be4d350e57ab5df56c19e85e/cpython 3.9.15+20221106 x86 64 unknown linux gnu install only.tar.gz/python/lib/python3.9/lib dynload/home/bob/.cache/nce/6621291ed4120fa45607b367abf7786ce496f389f27240712a63c31f1c438c21/bindings/venvs/2.16.0rc4/lib/python3.9/site-packages /home/bob/.cache/nce/6621291ed4120fa45607b367abf7786ce496f389f27240712a63c31f1c438c21/bindings/venvs/2.16.0rc4/bin/python /home/bob/.cache/nce/6621291ed4120fa45607b367abf7786ce496f389f27240712a63c31f1c438c21/bindings/venvs/2.16.0rc4/bin/pants --python-repos-find-links=-['file:///home/bob/.cache/nce/6621291ed4120fa45607b367abf7786ce496f389f27240712a63c31f1c438c21/bindings/find_links/2.16.0rc4/920d0b88/index.html'] --no-dynamic-ui --level=debug package src/dz/ingestion:notifier 121611.57 [DEBUG] pantsd is running at pid 52925, pailgun port is 36019 121611.57 [DEBUG] releasing lock: <pants.pantsd.lock.OwnerPrintingInterProcessFileLock object at 0x7f91b50d4af0> 121611.57 [DEBUG] Connecting to pantsd on port 36019 121611.57 [DEBUG] Connecting to pantsd on port 36019 attempt 1/3 121611.57 [DEBUG] Connected to pantsd 121611.58 [DEBUG] Launching 1 roots (poll=false). 121611.60 [DEBUG] computed 1 nodes in 0.014425 seconds. there are 34 total nodes. 121611.60 [DEBUG] Launching 1 roots (poll=false). 121611.60 [DEBUG] computed 1 nodes in 0.000146 seconds. there are 36 total nodes. 121611.62 [DEBUG] /home/bob/.cache/nce/6621291ed4120fa45607b367abf7786ce496f389f27240712a63c31f1c438c21/bindings/venvs/2.16.0rc4/lib/python3.9/site-packages/pants/backend/awslambda/python/rules.py105 Rule visitor failed to inspect assignment expression for ['py_major', 'py_minor'] - typing.Optional[typing.Tuple[int, int]]: Parameters to generic types must be types. Got 0. 121611.77 [INFO] Initializing scheduler... 121611.79 [DEBUG] File handle limit is: 10000 121611.80 [DEBUG] Using [cache::CommandRunner { inner: bounded::CommandRunner { inner: SwitchedCommandRunner { .. }, .. }, .. }, cache::CommandRunner { inner: bounded::CommandRunner { inner: SwitchedCommandRunner { .. }, .. }, .. }] for process execution. 121616.80 [DEBUG] Changes to /home/bob/.cache/nce/6621291ed4120fa45607b367abf7786ce496f389f27240712a63c31f1c438c21/bindings/venvs/2.16.0rc4/bin, outside of the buildroot, will not be invalidated. 121616.80 [DEBUG] Changes to /home/bob/.cache/nce/6621291ed4120fa45607b367abf7786ce496f389f27240712a63c31f1c438c21/bindings/venvs/2.16.0rc4/bin, outside of the buildroot, will not be invalidated. 121616.80 [DEBUG] Changes to /home/bob/.cache/nce/cdc3a4cfddcd63b6cebdd75b14970e02d8ef0ac5be4d350e57ab5df56c19e85e/cpython-3.9.15+20221106-x86_64-unknown-linux-gnu-install_only.tar.gz/python/lib/python39.zip, outside of the buildroot, will not be invalidated. 121616.80 [DEBUG] Changes to /home/bob/.cache/nce/cdc3a4cfddcd63b6cebdd75b14970e02d8ef0ac5be4d350e57ab5df56c19e85e/cpython-3.9.15+20221106-x86_64-unknown-linux-gnu-install_only.tar.gz/python/lib/python3.9, outside of the buildroot, will not be invalidated. 121616.80 [DEBUG] Changes to /home/bob/.cache/nce/cdc3a4cfddcd63b6cebdd75b14970e02d8ef0ac5be4d350e57ab5df56c19e85e/cpython-3.9.15+20221106-x86_64-unknown-linux-gnu-install_only.tar.gz/python/lib/python3.9/lib-dynload, outside of the buildroot, will not be invalidated. 121616.80 [DEBUG] Changes to /home/bob/.cache/nce/6621291ed4120fa45607b367abf7786ce496f389f27240712a63c31f1c438c21/bindings/venvs/2.16.0rc4/lib/python3.9/site-packages, outside of the buildroot, will not be invalidated. 121616.80 [DEBUG] setting up service <pants.pantsd.service.scheduler_service.SchedulerService object at 0x7fad96acea90> 121616.80 [DEBUG] setting up service <pants.pantsd.service.store_gc_service.StoreGCService object at 0x7f70313c0bb0> 121616.80 [DEBUG] starting service <pants.pantsd.service.scheduler_service.SchedulerService object at 0x7fad96acea90> 121616.80 [DEBUG] starting service <pants.pantsd.service.store_gc_service.StoreGCService object at 0x7f70313c0bb0> 121616.80 [INFO] Scheduler initialized. 121616.80 [DEBUG] Launching 1 roots (poll=false). 121616.80 [DEBUG] computed 1 nodes in 0.000316 seconds. there are 36 total nodes. 121616.80 [DEBUG] Launching 1 roots (poll=false). 121616.80 [DEBUG] computed 1 nodes in 0.000070 seconds. there are 36 total nodes. 121616.84 [WARN] DEPRECATED: option 'lockfile' in scope 'pytest' is scheduled to be removed in version 2.18.0.dev0. Custom tool versions are now installed from named resolves, as described at https://www.pantsbuild.org/v2.16/docs/python-lockfiles. 1. If you have an existing resolve that includes the requirements for this tool, you can set `[pytest].install_from_resolve = "<resolve name>". This may be the case if the tool also provides a runtime library, and you want to specify the version in just one place. 2. If not, you can set up a new resolve as described at the link above. Either way, the resolve you choose should provide the requirements currently set by the
requirements
option for this tool, which you can see by running
pants help-advanced pytest
. 121616.84 [DEBUG] specs are: Specs(includes=RawSpecs(description_of_origin='CLI arguments', address_literals=(AddressLiteralSpec(path_component='src/dz/ingestion', target_component='notifier', generated_component=None, parameters=FrozenDict({})),), file_literals=(), file_globs=(), dir_literals=(), dir_globs=(), recursive_globs=(), ancestor_globs=(), unmatched_glob_behavior=<GlobMatchErrorBehavior.error: 'error'>, filter_by_global_options=True, from_change_detection=False), ignores=RawSpecs(description_of_origin='CLI arguments', address_literals=(), file_literals=(), file_globs=(), dir_literals=(), dir_globs=(), recursive_globs=(), ancestor_globs=(), unmatched_glob_behavior=<GlobMatchErrorBehavior.error: 'error'>, filter_by_global_options=False, from_change_detection=False)) 121616.84 [DEBUG] changed_options are: ChangedOptions(since=None, diffspec=None, dependents=<DependentsOption.NONE: 'none'>) 121616.84 [DEBUG] Launching 1 roots (poll=false). 121616.86 [DEBUG] computed 1 node… pantsbuild/pants