Server Installation help


#1

I am trying to get an f-droid server up and I am far from a linux guru. I followed the instruction at https://f-droid.org/docs/Setup_an_F-Droid_App_Repo/ to get the Repo setup.

When I run…
fdroid init

I get…

projectadmin@KioskPC:/usr/share/nginx/www/fdroid$ fdroid init
CRITICAL: Unknown exception found!
Traceback (most recent call last):
File “/usr/local/bin/fdroid”, line 4, in
import(‘pkg_resources’).run_script(‘fdroidserver==0.8’, ‘fdroid’)
File “/usr/lib/python3/dist-packages/pkg_resources/init.py”, line 719, in run_script
self.require(requires)[0].run_script(script_name, ns)
File “/usr/lib/python3/dist-packages/pkg_resources/init.py”, line 1504, in run_script
exec(code, namespace, namespace)
File “/usr/local/lib/python3.5/dist-packages/fdroidserver-0.8-py3.5.egg/EGG-INFO/scripts/fdroid”, line 150, in
main()
File “/usr/local/lib/python3.5/dist-packages/fdroidserver-0.8-py3.5.egg/EGG-INFO/scripts/fdroid”, line 126, in main
mod.main()
File “/usr/local/lib/python3.5/dist-packages/fdroidserver-0.8-py3.5.egg/fdroidserver/init.py”, line 127, in main
shutil.copy(os.path.join(examplesdir, ‘fdroid-icon.png’), fdroiddir)
File “/usr/lib/python3.5/shutil.py”, line 235, in copy
copyfile(src, dst, follow_symlinks=follow_symlinks)
File “/usr/lib/python3.5/shutil.py”, line 114, in copyfile
with open(src, ‘rb’) as fsrc:
FileNotFoundError: [Errno 2] No such file or directory: ‘/usr/local/share/doc/fdroidserver/examples/fdroid-icon.png’

Any idea what is wrong? Ubuntu 16.04 LTS.

Any ideas as to what is wrong?


#2

/usr/share In GNU/Linux this path is only for the root user. You’re running the command as a normal user, without root permissions.

You should choose another directory to create your repository, or run the command as sudo:

sudo fdroid init

Cheers!


#3

Thanks for the tip. However, it seems there is more to the problem. When I run ‘sudo fdroid init’, I now get the following error…
projectadmin@KioskPC:/usr/share/nginx/www/fdroid$ sudo fdroid init
ERROR: No Android SDK found!
ERROR: You can use ANDROID_HOME to set the path to your SDK, i.e.:
ERROR: export ANDROID_HOME=/opt/android-sdk
CRITICAL: Unknown exception found!
Traceback (most recent call last):
File “/usr/local/bin/fdroid”, line 4, in
import(‘pkg_resources’).run_script(‘fdroidserver==0.8’, ‘fdroid’)
File “/usr/lib/python3/dist-packages/pkg_resources/init.py”, line 719, in run_script
self.require(requires)[0].run_script(script_name, ns)
File “/usr/lib/python3/dist-packages/pkg_resources/init.py”, line 1504, in run_script
exec(code, namespace, namespace)
File “/usr/local/lib/python3.5/dist-packages/fdroidserver-0.8-py3.5.egg/EGG-INFO/scripts/fdroid”, line 150, in
main()
File “/usr/local/lib/python3.5/dist-packages/fdroidserver-0.8-py3.5.egg/EGG-INFO/scripts/fdroid”, line 126, in main
mod.main()

Notice, when running as root, it can’t find the Android SDK. Please note that I am running the latest version which is now Android Studio and some of the commands have been replaced, for example ‘android sdk’ no longer works. Do I need an older version? I think I have it installed properly and ‘adb devices’ is working from the terminal, so I think the path is correct.

Thanks,
Jonathan


#4

I don’t know how you installed the fdroidserver package, but I just ran sudo apt-get install fdroidserver and got everything running at the first try…

You should try with a normal user rather than root.