a2ps stops with "a2ps: cannot find file `level1.ppd': No such file or directory" #4531
-
Output of
|
Beta Was this translation helpful? Give feedback.
Replies: 18 comments 11 replies
-
Does If not, what does |
Beta Was this translation helpful? Give feedback.
-
the issue persists after output of lrwxr-xr-x 1 bruder admin 32 May 25 10:59 /opt/homebrew/share/a2ps -> ../Cellar/a2ps/4.15.4/share/a2ps /opt/homebrew/share/a2ps/ppd: |
Beta Was this translation helpful? Give feedback.
-
What's the output of:
? |
Beta Was this translation helpful? Give feedback.
-
In a new empty directory ~/Tmp the result is
|
Beta Was this translation helpful? Give feedback.
-
Now this is getting interesting. What's the output of:
? |
Beta Was this translation helpful? Give feedback.
-
thanks for your replies! Here are the outputs of the two commands:
|
Beta Was this translation helpful? Give feedback.
-
How about:
? |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
Something's seriously broken in your
? |
Beta Was this translation helpful? Give feedback.
-
here is the (long) output of ==> Downloading https://formulae.brew.sh/api/formula.jws.json |
Beta Was this translation helpful? Give feedback.
-
unfortunately, the error is still the same: a2ps tmp.txt |
Beta Was this translation helpful? Give feedback.
-
/opt/homebrew/etc/a2ps.cfg:LibraryPath: /opt/homebrew/Cellar/a2ps/4.14/share/a2ps/sheets:/opt/homebrew/Cellar/a2ps/4.14/share/a2ps/ps:/opt/homebrew/Cellar/a2ps/4.14/share/a2ps/encoding:/opt/homebrew/Cellar/a2ps/4.14/share/a2ps/afm:/opt/homebrew/Cellar/a2ps/4.14/share/ogonkify/afm:/opt/homebrew/Cellar/a2ps/4.14/share/a2ps/ppd:/opt/homebrew/Cellar/a2ps/4.14/share/a2ps/fonts:/opt/homebrew/Cellar/a2ps/4.14/share/ogonkify/fonts:/opt/homebrew/Cellar/a2ps/4.14/share/a2ps |
Beta Was this translation helpful? Give feedback.
-
a2ps works again, many thanks!! Is there anything I should do differently in the future (in updating brew)? |
Beta Was this translation helpful? Give feedback.
-
I've used brew last week to install tools on a new system, but a2ps fails here with the same symptom: My configuration: I have uninstalled a2ps, deleted its config files, and reinstalled, without fixing the problem. $ which a2ps The .ppd files are present:
LibraryPath seems to be correct -- it includes that directory: Any suggestions? |
Beta Was this translation helpful? Give feedback.
-
~/Downloads $ a2ps --which level1.ppd
a2ps: cannot find file `level1.ppd': No such file or directory
where it should be finding things:
~/Downloads $ which a2ps
/opt/homebrew/bin/a2ps
~/Downloads $ ls -l /opt/homebrew/bin/a2ps
lrwxr-xr-x 1 jrv admin 30 Jun 14 13:14 /opt/homebrew/bin/a2ps ->
../Cellar/a2ps/4.15.4/bin/a2ps
~/Downloads $ find /opt/homebrew -name level1.ppd
/opt/homebrew/Cellar/a2ps/4.15.4/share/a2ps/ppd/level1.ppd
…On Fri, Jun 16, 2023 at 6:21 AM Adrian Ho ***@***.***> wrote:
What's the output of a2ps --which level1.ppd?
—
Reply to this email directly, view it on GitHub
<#4531 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ADGUPYWZEXD5LM625UNNFZDXLQXTJANCNFSM6AAAAAAYN4QOJI>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
*$ *readlink -f %R /opt/homebrew/opt/a2ps
/opt/homebrew/Cellar/a2ps/4.15.4
…On Mon, Jun 19, 2023, 11:48 PM Adrian Ho ***@***.***> wrote:
What's the output of readlink -f %R /opt/homebrew/opt/a2ps?
—
Reply to this email directly, view it on GitHub
<#4531 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ADGUPYWSLONVLJL4OVXQSY3XMEMRRANCNFSM6AAAAAAYN4QOJI>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
Unfortunately it still fails.
On Linux, I would use strace to see where a2ps is looking for the file.
This is apparently very hard to do on a Mac, as described by James Risner
here:
https://stackoverflow.com/questions/73724074/how-to-call-an-equivalent-command-to-strace-on-mac-ideally-from-python
However, he has a good suggestion:
Rewrite the code to not use strace on either Linux or macOS and build a
framework to get the information you need during the build directly.
Since you have the source code, you can find where it’s trying to open that
file, and print out the list of places it’s looking. Or, better yet, where
it’s looking to get the path to search.
Actually, “a2ps –list=defaults” ought to print this, and it does under
Linux. I think the fact that it doesn’t on a Mac is a bug:
*$ *a2ps --list defaults
a2ps: cannot find file `level1.ppd': No such file or directory
*$ *a2ps --list=defaults
a2ps: cannot find file `level1.ppd': No such file or directory
*$ *a2ps --list=ppd
a2ps: cannot find file `level1.ppd': No such file or directory
However, this works on a Linux installation where it can find the file. I
haven't tried hiding the file first.
This should be easy to fix: handle the “—list” option before looking for
.ppd files.
Here’s the log of the re-installation, FWIW:
*$ *brew reinstall $(brew deps a2ps) a2ps
==> *Fetching **bdw-gc*
==> *Downloading https://ghcr.io/v2/homebrew/core/bdw-gc/manifests/8.2.4
<https://ghcr.io/v2/homebrew/core/bdw-gc/manifests/8.2.4>*
####################################################################################################################################################################################
100.0%
==> *Downloading
https://ghcr.io/v2/homebrew/core/bdw-gc/blobs/sha256:d72bbcd333cb094f8420140377f52d180215cb9da36e6ee2e7844131dd3893e6
<https://ghcr.io/v2/homebrew/core/bdw-gc/blobs/sha256:d72bbcd333cb094f8420140377f52d180215cb9da36e6ee2e7844131dd3893e6>*
==> *Downloading
from https://pkg-containers.githubusercontent.com/ghcr1/blobs/sha256:d72bbcd333cb094f8420140377f52d180215cb9da36e6ee2e7844131dd3893e6?se=2023-06-21T11%3A50%3A00Z&sig=owqif
<https://pkg-containers.githubusercontent.com/ghcr1/blobs/sha256:d72bbcd333cb094f8420140377f52d180215cb9da36e6ee2e7844131dd3893e6?se=2023-06-21T11%3A50%3A00Z&sig=owqif>*
####################################################################################################################################################################################
100.0%
==> *Reinstalling **bdw-gc*
==> *Pouring bdw-gc--8.2.4.arm64_ventura.bottle.tar.gz*
🍺 /opt/homebrew/Cellar/bdw-gc/8.2.4: 73 files, 1.7MB
==> *Running `brew cleanup bdw-gc`...*
Disable this behaviour by setting HOMEBREW_NO_INSTALL_CLEANUP.
Hide these hints with HOMEBREW_NO_ENV_HINTS (see `man brew`).
==> *Fetching **libpaper*
==> *Downloading https://ghcr.io/v2/homebrew/core/libpaper/manifests/2.1.0
<https://ghcr.io/v2/homebrew/core/libpaper/manifests/2.1.0>*
####################################################################################################################################################################################
100.0%
==> *Downloading
https://ghcr.io/v2/homebrew/core/libpaper/blobs/sha256:47e3941deebafbec31d1767d0616f1f93c5c4f54f103d4deead70ec8bc3a2974
<https://ghcr.io/v2/homebrew/core/libpaper/blobs/sha256:47e3941deebafbec31d1767d0616f1f93c5c4f54f103d4deead70ec8bc3a2974>*
==> *Downloading
from https://pkg-containers.githubusercontent.com/ghcr1/blobs/sha256:47e3941deebafbec31d1767d0616f1f93c5c4f54f103d4deead70ec8bc3a2974?se=2023-06-21T11%3A50%3A00Z&sig=G%2Bx
<https://pkg-containers.githubusercontent.com/ghcr1/blobs/sha256:47e3941deebafbec31d1767d0616f1f93c5c4f54f103d4deead70ec8bc3a2974?se=2023-06-21T11%3A50%3A00Z&sig=G%2Bx>*
####################################################################################################################################################################################
100.0%
==> *Reinstalling **libpaper*
==> *Pouring libpaper--2.1.0.arm64_ventura.bottle.tar.gz*
🍺 /opt/homebrew/Cellar/libpaper/2.1.0: 17 files, 266.5KB
==> *Running `brew cleanup libpaper`...*
==> *Fetching **a2ps*
==> *Downloading https://ghcr.io/v2/homebrew/core/a2ps/manifests/4.15.4-1
<https://ghcr.io/v2/homebrew/core/a2ps/manifests/4.15.4-1>*
Already downloaded:
/Users/jrv/Library/Caches/Homebrew/downloads/3dbfc0db3039eed15377441a8359997a28e21ad1ca013cef7a9260859ac53a47--a2ps-4.15.4-1.bottle_manifest.json
==> *Downloading
https://ghcr.io/v2/homebrew/core/a2ps/blobs/sha256:c28ce183c0df4d35f1140e165de4c5593a18068af361442fede10817f10b81a8
<https://ghcr.io/v2/homebrew/core/a2ps/blobs/sha256:c28ce183c0df4d35f1140e165de4c5593a18068af361442fede10817f10b81a8>*
Already downloaded:
/Users/jrv/Library/Caches/Homebrew/downloads/87fe7c7d1a3a603ab54324008ca415c9ea868d2bda68c70a28986deeac5b8f5d--a2ps--4.15.4.arm64_ventura.bottle.1.tar.gz
==> *Reinstalling **a2ps*
==> *Pouring a2ps--4.15.4.arm64_ventura.bottle.1.tar.gz*
==> *Caveats*
Emacs Lisp files have been installed to:
/opt/homebrew/share/emacs/site-lisp/a2ps
==> *Summary*
🍺 /opt/homebrew/Cellar/a2ps/4.15.4: 275 files, 3.3MB
==> *Running `brew cleanup a2ps`...*
==> *Caveats*
==> *a2ps*
Emacs Lisp files have been installed to:
/opt/homebrew/share/emacs/site-lisp/a2ps
*$ *cd ../../../proj/bca/
*~/Documents/proj/bca $ *a2ps -1 -f9 ellipsoid.m
a2ps: cannot find file `level1.ppd': No such file or directory
…On Tue, Jun 20, 2023 at 8:23 PM Adrian Ho ***@***.***> wrote:
Well, that's exactly what it should be, so something's gone seriously
pear-shaped with a2ps and/or its dependencies. Something I should've
asked you to do at the start:
brew reinstall $(brew deps a2ps) a2ps
See if that fixes things. If not, I'm out of ideas.
—
Reply to this email directly, view it on GitHub
<#4531 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ADGUPYT55UCE7ASVLGEA3XDXMI5HRANCNFSM6AAAAAAYN4QOJI>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
Sun 23 Jul 2023 09:01:14 BST @gromgit Have just encountered this problem. As per above, have run:
Same error and:
The Replacing
|
Beta Was this translation helpful? Give feedback.
There's your problem: your entire
LibraryPath
points to an older version. Probably a good idea to "opt
-imize" the paths in your config, like this:then try using
a2ps
again.