On Mon, 1 Mar 2021 at 14:26, 'Zam' via asciidoc
<[email protected]> wrote:
>
> Hello Lex,
> Thank you for the (very) quick response!
> Here is the output of adding -v -v to my original command:
>
> a2x: args: ['-v', '-v', '--format=pdf', 'doc/article.txt']
> a2x: resource files: []
> a2x: resource directories: ['/usr/local/etc/asciidoc/images', 
> '/usr/local/etc/asciidoc/stylesheets']
> a2x: executing: "/usr/local/bin/asciidoc.py" --backend docbook -a 
> "a2x-format=pdf"  --verbose  --out-file 
> "/home/zam/Downloads/asciidoc-9.0.5/doc/article.xml" 
> "/home/zam/Downloads/asciidoc-9.0.5/doc/article.txt"
>
> asciidoc: reading: /usr/local/etc/asciidoc/asciidoc.conf
> asciidoc: reading: /home/zam/Downloads/asciidoc-9.0.5/doc/asciidoc.conf
> asciidoc: reading: /home/zam/Downloads/asciidoc-9.0.5/doc/article.txt
> asciidoc: reading: /usr/local/etc/asciidoc/docbook45.conf
> asciidoc: reading: /usr/local/etc/asciidoc/filters/code/code-filter.conf
> asciidoc: reading: /usr/local/etc/asciidoc/filters/music/music-filter.conf
> asciidoc: reading: 
> /usr/local/etc/asciidoc/filters/source/source-highlight-filter.conf
> asciidoc: reading: 
> /usr/local/etc/asciidoc/filters/graphviz/graphviz-filter.conf
> asciidoc: reading: /usr/local/etc/asciidoc/filters/latex/latex-filter.conf
> asciidoc: reading: /usr/local/etc/asciidoc/lang-en.conf
> asciidoc: reading: /home/zam/Downloads/asciidoc-9.0.5/doc/asciidoc.conf
> asciidoc: writing: /home/zam/Downloads/asciidoc-9.0.5/doc/article.xml
>
> a2x: executing: "xmllint" --nonet --noout --valid 
> "/home/zam/Downloads/asciidoc-9.0.5/doc/article.xml"
>
> /bin/sh: 1: xmllint: not found

This means xmllint isn't installed which you have fixed.

>
> a2x: ERROR: "xmllint" --nonet --noout --valid 
> "/home/zam/Downloads/asciidoc-9.0.5/doc/article.xml" returned non-zero exit 
> status 127
>
> And here is the output of that very same command, i.e., a2x -v -v 
> --format=pdf doc/article.txt, once I installed xmllint:
>
> [The first 18 lines of code are identical]
>
> a2x: executing: "xmllint" --nonet --noout --valid 
> "/home/zam/Downloads/asciidoc-9.0.5/doc/article.xml"
>
> I/O error : Attempt to load network entity 
> http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd
> /home/zam/Downloads/asciidoc-9.0.5/doc/article.xml:2: warning: failed to load 
> external entity "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd";
> D DocBook XML V4.5//EN" 
> "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd";
>                                                       ^
> /home/zam/Downloads/asciidoc-9.0.5/doc/article.xml:6: validity error : 
> Validation failed: no DTD found !
> <article lang="en">
> ^

This means you don't have the relevant XML dtds installed, but you can
run a2x with --no-xmllint to skip it, xmllint is just a sanity check,
its not required.


>
> a2x: ERROR: "xmllint" --nonet --noout --valid 
> "/home/zam/Downloads/asciidoc-9.0.5/doc/article.xml" returned non-zero exit 
> status 4
>
> I then found this old thread of yours and others, 
> https://groups.google.com/g/asciidoc/c/FC-eOwU8rYg, on exactly the same 
> non-zero exit status 4 and tried out its last two solutions --- alas, to no 
> avail. Whereas the first solution, i.e., that of [email protected], gave me 
> the output:
>
> [Same first 18 lines of code]

I'm not sure which solution you used, but clearly you got past xmllint

>
> a2x: executing: "dblatex" -t pdf -p 
> "/usr/local/etc/asciidoc/dblatex/asciidoc-dblatex.xsl" -s 
> "/usr/local/etc/asciidoc/dblatex/asciidoc-dblatex.sty"  -V  
> "/home/zam/Downloads/asciidoc-9.0.5/doc/article.xml"
>
> /bin/sh: 1: dblatex: not found

You need relevant toolchains installed to process the docbook asciidoc
produces, see https://asciidoc.org/a2x.1.html#X1 linked from the top
of the a2x page.  a2x is simply a script to simplify some of the steps
to do that, it doesn't include the toolchains.

>
> a2x: ERROR: "dblatex" -t pdf -p 
> "/usr/local/etc/asciidoc/dblatex/asciidoc-dblatex.xsl" -s 
> "/usr/local/etc/asciidoc/dblatex/asciidoc-dblatex.sty"  -V  
> "/home/zam/Downloads/asciidoc-9.0.5/doc/article.xml" returned non-zero exit 
> status 127
>
> the second one, i.e., that of [email protected], threw me once more the 
> above-mentioned non-zero exit status 4 output.
>
> It seems this is a quite common---and, strangely, old---problem relating to 
> a2x. I don't know, however, what I'm supposed to now.

Its quite common for people to not read the part about needing
toolchains to process the docbook into PDF.  AsciiDoc itself only
produces docbook or HTML itself. As linked above its addressed in the
a2x page, and also discussed in the AsciiDoc user guide
https://asciidoc.org/userguide.html#_docbook.

Cheers
Lex

>
> Would very much appreciate your thoughts on this, Lex.
>
> Cheers,
>
> Zam
>
> El domingo, 28 de febrero de 2021 a la(s) 20:03:53 UTC-5, Lex Trotman 
> escribió:
>>
>> try adding -v -v yes thats twice, to the a2x command to get expanded
>> error messages.
>>
>> Cheers
>> Lex
>>
>> On Mon, 1 Mar 2021 at 10:53, 'Zam' via asciidoc
>> <[email protected]> wrote:
>> >
>> >
>> > Hello there,
>> >
>> > I have just installed AsciiDoc 9.0.5 
>> > (https://github.com/asciidoc-py/asciidoc-py/releases) on my Linux machine 
>> > and have successfully tested the installation (as per 
>> > https://asciidoc.org/INSTALL.html).
>> >
>> > Unfortunately, though, I'm unable to run a2x --format=pdf doc/article.txt 
>> > on the sample article.txt file included in the distribution root 
>> > directory. This is the error message I keep getting again and again:
>> >
>> > a2x: ERROR: "xmllint" --nonet --noout --valid 
>> > "/home/user/Downloads/asciidoc-9.0.5/doc/article.xml" returned non-zero 
>> > exit status 127
>> >
>> > Any ideas of what the problem might be?
>> >
>> > Thank you very much in advance.
>> >
>> > Cheers,
>> >
>> > Zam
>> >
>> >
>> > --
>> > You received this message because you are subscribed to the Google Groups 
>> > "asciidoc" group.
>> > To unsubscribe from this group and stop receiving emails from it, send an 
>> > email to [email protected].
>> > To view this discussion on the web visit 
>> > https://groups.google.com/d/msgid/asciidoc/e0aa14f5-47b4-44de-816e-195fd79bcd5bn%40googlegroups.com.
>
> --
> You received this message because you are subscribed to the Google Groups 
> "asciidoc" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected].
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/asciidoc/299848fb-5d26-4684-8ea3-69668841f078n%40googlegroups.com.

-- 
You received this message because you are subscribed to the Google Groups 
"asciidoc" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/asciidoc/CAKhWKDPLV2ogTcUWm_Bs38yBB8D-WLpBHL-Wbm%3D8xMfrLkrrLg%40mail.gmail.com.

Reply via email to