Cannot install portaudio package

I am trying to write a go program to capture audio to an array using portaudio.
I am doing this on a chromebook using Termux with go installed.
When I get GitHub - gordonklaus/portaudio: Go bindings for the PortAudio audio I/O library the package appears under the src folder. However if I try to import the package in a program, or if a try to build or install the package, I get:

~/go $ go run myprogram.go

pkg-config --cflags – portaudio-2.0

Package portaudio-2.0 was not found in the pkg-config search path.
Perhaps you should add the directory containing `portaudio-2.0.pc’
to the PKG_CONFIG_PATH environment variable
No package ‘portaudio-2.0’ found
pkg-config: exit status 1
~/go $

Can anybody help?

You need to install the portaudio-2.0 development package for your operating system and pkg-config.

Portaudio-2.0 is not listed in the Termux pkg list. Does that mean that it can’t be done?

You can always try to self package.

On the other hand side, I was unable to find any mention of official android support for portaudio. So I doubt that’ll be an easy task.

You need to install the portaudio’s development headers.
On Debian-based systems, run sudo apt install portaudio19-dev.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.