Install Alpaka: Permission denied

Install Alpaka (and Ollama)
Hello, I’m trying to install Alpaka. This is my first time building and installing a package, so please bare with me!

From

Alpaka is a client for Ollama built with Kirigami.

Getting started (official instructions):
To run Alpaka, you will need to install Ollama and have it serving on http://localhost:11434. You will also need to install a model for ollama to use; you can do so by running ollama pull llama2. After that, you can build and run Alpaka and it will interface with the Ollama API.

I installed ollama (url Download Ollama on Linux):
sudo curl -fsSL https://ollama.com/install.sh | sh

Had Ollama serving on http://localhost:11435
OLLAMA_HOST=127.0.0.1:11435 ollama serve

because 11434 was already in use.

And I ran ollama pull llama2

Then tried to install Alpaka from GitHub
clone GitHub - KDE/alpaka: Kirigami client for Ollama
or
gh repo clone KDE/alpaka

I used git clone GitHub - KDE/alpaka: Kirigami client for Ollama

touch PKGBUILD inside the folder ~/alpaka

I have built the package with makepkg -si command but get Permission denied running alpaka from:
/usr/bin/alpaka: line 4: ./alpaka/src/widgets/KLLMResultWidget.cpp: Permission denied

Also, if I go into the /usr/bin/ and try to run alpaka I get a different error message:
/usr/bin/alpaka: line 4: -o: command not found
For me, that is a bit strange since it is the code from

and I’m thinking the -o should be recognised?
The XGETTEXT

says 6.1.2 Output file location

‘-o file’
‘–output-file=file’

Write output to specified PO file.

This is how my PKGBUILD looks:
pkgname=“alpaka”
pkgver=“1.0.0”
pkgrel=“1”
pkgdesc=“KDE client for Ollama built with Kirigami”
arch=(“x86_64”)
license=(“custom”)
source=(“Messages.sh”)
sha512sums=(“SKIP”)

package() {
mkdir -p “${pkgdir}/usr/bin”
cp “${srcdir}/Messages.sh” “${pkgdir}/usr/bin/alpaka”
chmod +x “${pkgdir}/usr/bin/alpaka”
}

I’ve read that permission denied can be fixed with -R so I’ve tried to add that to the last line chmod +x -R “${pkgdir}/usr/bin/alpaka”, but that didn’t help.

And this is how /usr/bin/alpaka file looks:
#! /usr/bin/env bash

SPDX-FileCopyrightText: None

SPDX-License-Identifier: CC0-1.0

$XGETTEXT find . \( -name \*.cpp -o -name \*.h -o -name \*.qml \) -o $podir/alpaka.pot

Can you see what is wrong?

Everthing. Just use the AUR package AUR (en) - alpaka-git

1 Like

Also, ollama is in the official repository. No need pulling them with the weird scripts.

1 Like

This is why I love CachyOS; everything I want to do is already done!
Ok sorry guys, I made a mess, I was inspired to learn how to build a package for the first time, but I learn and know now that it is better for me to ask here in the Cachy community if the solution exists first before I start another endeavor to make my own package (and most likely another mess)!

lol, thank you @naim I didn’t know it existed, I should have asked first, would have saved me the evening! :laughing:
I want to revert my alpaka-attempt. Do you know if I can install AUR (en) - alpaka-git before I clean my mess, does it matter, or would you recommend me to clean my mess first and then install AUR (en) - alpaka-git?

Thx @ptr1337 this forum is so great, the answers come so fast (I’ll start to ask here before I make a mess)!

I want to revert the mess I’ve done.
Based on my doings, do you or anyone else know have I revert and clean the ollama part?
"I installed ollama (url Download Ollama on Linux):
sudo curl -fsSL https://ollama.com/install.sh | sh

Had Ollama serving on http://localhost:11435
OLLAMA_HOST=127.0.0.1:11435 ollama serve

because 11434 was already in use.

And I ran ollama pull llama2"

For the ollama stuff you did, You can just revert what the script has done, for alpaka-git, you can remove your previously built package and install the one from the AUR.

That is good news!
How do I revert? Please bare with me, I’ve just started using Linux…:blush::innocent::pray: