Installing pandoc on pinebook pro

Hi, I installed manjaro arm on amy pinebook pro, and I can’t find pandoc in the repositories using pacman. What is the best way to install it?

Thanks!

It is available in AUR, Make sure Pamac/Pacman can access AUR. I have have not tried building it…but hopefully it is straight forward or just requires changing PKGBUILD to aarch64 …

1 Like

The only pandoc main package I can find in the AUR is pandoc-bin which is an x64 only binary.

I am not allowed to include links, but there is a link on launchpad dot net that suggests that pandoc can be built on arm64.

It probably can, but it requires a lot of haskell packages, which is not in our repo.

Doh! did not notice it was a binary…or that it required a bunch of Haskell packages. Sorry for leading you astray codebreaker (thanks correcting Strit).

So I tried the debian arm build for the PBP, and pandoc (and pandoc-citeproc) is available in the standard repos (Sid), and runs fine when installed. But that debian build is pretty unstable (eg, I lost wifi, with networkmanager saying no devices available and even after a fresh debian re-flash and after re-booting into manjaro where wifi continues to work fine). The arch was armhf and not arm64 as I thought. I tried to get a list of the debs installed but could not because of the wifi issue.

Is there a way to get the debian build of pandoc going on manjaro?

If you could find another AUR *-bin package to use as a template you could potentially try to make your own pandoc-arm64-bin package. Lots of *-bin AUR packages just nab the required binaries from Ubuntu’s repos. I was actually trying to make this package, as it’s one of the ones I need to get working in order to build rstudio-desktop on Manjaro ARM. I haven’t had the time to look into this of late though.

Psst: pandoc is only an optional dependency to rstudio-desktop, according to it’s AUR page.

I don’t understand what the significance of rstudio is in this context? I can do nearly everything I need to do with or without rstudio, but pandoc is absolutely required because it cannot be replicated by any other tool.

I wasn’t sure. It’s listed as an optional dependency, but the package source, e.g. https://github.com/rstudio/rstudio/tarball/v1.3.1073 bundles an shell script called “install-pandoc” to download an x86_64 pandoc binary if it can’t find one.

So I have pandoc working, but pandoc-citeproc is well beyond my abilities, as it has at least 40 dependencies that I have no idea how to deal with, and no indication that it would work even if I were able to get everything installed. Wow, Haskell seems like a nighmare. Given that pandoc is pretty useless to me without pandoc-citeproc, I’m not sure how much progress this is. I have almost no experience with arch/aur/pacman, which doesn’t help. I kept decent notes (in the form of a shell script) on my progress with installing the pandoc bin however, and I include the script here in case it helps someone.

sudo pacman -Sy texlive-core # texconfig; needed to get pdflatex working
sudo pacman -Sy texlive-bin  # pdflatex; needed to create pdf's with pandoc
sudo pacman -Sy rpmextract
sudo pacman -Sy dpkg

# Install libpcre3,  a dependency of pandoc
mkdir libpcre
cd libpcre
wget http://ftp.altlinux.org/pub/distributions/ALTLinux/Sisyphus/aarch64/RPMS.classic/libpcre3-8.44-alt1.aarch64.rpm
rpmextract.sh libpcre3-8.44-alt1.aarch64.rpm
cd lib64
sudo cp * /usr/lib
# ldconfig complains, but things seem to work:
# 
# ldconfig: /usr/lib/libtranscript.so.1 is not a symbolic link
# 
# ldconfig: /usr/lib/libpcreposix.so.3 is not a symbolic link
# 
# ldconfig: /usr/lib/libpcre.so.3 is not a symbolic link
ldconfig
cd ../..

# Install pandoc
wget http://ftp.br.debian.org/debian/pool/main/p/pandoc/pandoc-data_2.9.1.1-3_all.deb
# the data package installs fine as is
dpkg -i pandoc-data_2.9.1.1-3_all.deb
    
mkdir pandoc_bin
cd pandoc_bin
wget https://debian.pkgs.org/11/debian-main-arm64/pandoc_2.9.1.1-3_arm64.deb.html
# the bin does not install due to dependency problems (although it executes fine), so unpack and copy manually
ar x pandoc_2.9.1.1-3_arm64.deb
unxz data.tar.xz
tar -xvf data.tar
sudo cp ./usr/bin/pandoc /usr/bin
cd ..

Any suggestions, insights, or help would be very much appreciated. Thanks!

It’s not optimal, but you could always try to use a working Debian-based Docker container and either use pandoc or even try to build it there and extract the binaries from the container afterwards.

I did that for hledger, which is otherwise impossible to use on aarch64 due to Haskell not being available.