Ampache on RPi zero w Topic is solved

Having issues with your DietPi installation or found a bug? Post it here.
kk345
Posts: 18
Joined: Sun Dec 06, 2020 10:02 am

Ampache on RPi zero w

Post by kk345 »

Hi,

I have dietpi installed on raspberry pi zero w
I installed Ampache from dietpi-software
my pi has static ip 192.168.2.50
when i open the page 192.168.2.50/ampache it says

Error
You may have reached this page because Ampache was unable to load the required dependencies
Please visit the wiki for help


looking at the ampache wiki i found the following
"Attention: Composer version 2.x is not compatible to Ampache. Take care to use the latest 1.x version."

when i checked composer version in my rpi it says V2.0.8

also during installation of ampache i noticed some warnings/issues like "composer plugins not compatible", i dont exactly remember them.

i tried to downgrade composer from V2.0.8 to V1.10.19, but when i reinstall ampache it updates composer to V2.0.8

Can anyone help me installing Ampache......
Thanks in advance....

Note: i also have pihole running on the same rpi zero w

update:

reinstalled Ampache using below command
dietpi-software reinstall 40

attached log file
Attachments
log.txt
(11.35 KiB) Downloaded 35 times
User avatar
Joulinar
Posts: 4113
Joined: Sat Nov 16, 2019 12:49 am

Re: Ampache on RPi zero w

Post by Joulinar »

Hi,

many thanks for your message. Indeed the issue is with the Composer version. Following is stated on ampache wiki

https://github.com/ampache/ampache/wiki/Installation
Composer
Since 3.8.1, Composer is used to manage dependencies. You should download it and install it (e.g: mv composer.phar /usr/local/bin/composer), then run composer install --prefer-source --no-interaction on Ampache directory. Attention: Composer version 2.x is not compatible to Ampache. Take care to use the latest 1.x version.
Let me check with the developer on this how to mitigate.

for reference, pull request created https://github.com/MichaIng/DietPi/pull/3956
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
User avatar
WarHawk
Posts: 713
Joined: Thu Jul 20, 2017 8:55 am

Re: Ampache on RPi zero w

Post by WarHawk »

Did you do the apt update && apt upgrade?
kk345
Posts: 18
Joined: Sun Dec 06, 2020 10:02 am

Re: Ampache on RPi zero w

Post by kk345 »

Hi WarHawk,
WarHawk wrote: Tue Dec 08, 2020 4:55 am Did you do the apt update && apt upgrade?
dietpi is already doing that every time I install any software through dietpi-software.

I installed and reinstalled Ampache through dietpi-software.

Hi Joulinar,
Joulinar wrote: Mon Dec 07, 2020 10:56 pm Hi,

many thanks for your message. Indeed the issue is with the Composer version. Following is stated on ampache wiki

https://github.com/ampache/ampache/wiki/Installation
Composer
Since 3.8.1, Composer is used to manage dependencies. You should download it and install it (e.g: mv composer.phar /usr/local/bin/composer), then run composer install --prefer-source --no-interaction on Ampache directory. Attention: Composer version 2.x is not compatible to Ampache. Take care to use the latest 1.x version.
Let me check with the developer on this how to mitigate.

for reference, pull request created https://github.com/MichaIng/DietPi/pull/3956
Thanks for confirming the bug.
Do I have to wait till v6.34 is released or is there a workaround.
User avatar
Joulinar
Posts: 4113
Joined: Sat Nov 16, 2019 12:49 am

Re: Ampache on RPi zero w

Post by Joulinar »

@kk345
You could hack dietpi-software yourself. it's not that complicated. Basicaly that's the lines to be replaced

https://github.com/MichaIng/DietPi/pull/3956/files
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
kk345
Posts: 18
Joined: Sun Dec 06, 2020 10:02 am

Re: Ampache on RPi zero w

Post by kk345 »

Joulinar wrote: Tue Dec 08, 2020 9:33 am @kk345
You could hack dietpi-software yourself. it's not that complicated. Basicaly that's the lines to be replaced

https://github.com/MichaIng/DietPi/pull/3956/files
Hi,

Now I am able to install ampache without any issues.
Opening 192.168.2.50/ampache it asked for update from webpage and I did it. Then i was greeted with login page and able to login. Now I have 2 issues

1.
After login I am able play play music add to catalog. But I always see a banner saying

Your Ampache config file is out of date!
Download a new config file to manually update | Write a new config file directly to disk

After clicking "write a new config file directly to disk" does nothing, it still shows the same. Did a reboot. Logged in and I still see

Your Ampache config file is out of date!
Download a new config file to manually update | Write a new config file directly to disk

Am I missing something?
I checked /var/www/ampache/config/ampache.cfg.php and its available.

2.
As per system settings in webpage Subsonic backend is enabled but I am unable to use subsonic clients (I tried subsonic and ultrasonic apps from fdroid)

I am a novice to Linux and webservers. I checked ampache wiki too.

Thanks in advance
User avatar
Joulinar
Posts: 4113
Joined: Sat Nov 16, 2019 12:49 am

Re: Ampache on RPi zero w

Post by Joulinar »

ah ok I see there is an issue with file permissions. Thx for reporting. Pls do following

Code: Select all

chown -R www-data:www-data /var/www/ampache/
To be on safe side, restart your system afterwards. Now you should be able to update the configuration file from the Gui
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
kk345
Posts: 18
Joined: Sun Dec 06, 2020 10:02 am

Re: Ampache on RPi zero w

Post by kk345 »

After changing file permissions and rebooting I am able to Write a new config file directly to disk from GUI, but still cant access from subsonic clients.

Checked 192.168.2.50/ampache/test.php
"Configuration file readability warning: This test attempts to read config/ampache.cfg.php. If this fails the file is either not in the correct location, or not readable.
If you are installing Ampache for the first time you can ignore this warning and proceed to the installer. Web Installation."

Did a reboot and again checked 192.168.2.50/ampache/test.php still says "Configuration file readability warning."
User avatar
Joulinar
Posts: 4113
Joined: Sat Nov 16, 2019 12:49 am

Re: Ampache on RPi zero w

Post by Joulinar »

strange, where do you have that error message?
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
kk345
Posts: 18
Joined: Sun Dec 06, 2020 10:02 am

Re: Ampache on RPi zero w

Post by kk345 »

Did a clean install of dietpi and pihole.
Modified dietpi-software for composer, installed ampache. Then permission by
chown -R www-data:www-data /var/www/ampache/

Checked ampache settings and by default subsonic backend is enabeled in ampache. But still unable to connect from subsonic clients from android.

Ampache test page gives a warning on config file readability.
20201214_080110.jpg
Am I missing anything...
Post Reply