Installation process

All other Source.Python topics and issues.
kRYOoX
Junior Member
Posts: 2
Joined: Sun Jun 25, 2017 2:19 pm

Installation process

Postby kRYOoX » Sun Jun 25, 2017 3:40 pm

Hello,

I'm trying to get started on a plugin for Source Python but I got stuck very early : the installation of Source Python itself.

I'm running a Debian 8 (Jessie) server. My csgo server is up to date and the GLIBC version is 2.19.
If I believe the wiki's installation page I should be good to go. But I'm not.

The first error I had was this one:

Code: Select all

[Source.Python] Loading...
Traceback (most recent call last):
  File "/home/csgoserver/serverfiles/csgo/addons/source-python/packages/source-python/__init__.py", line 47, in load
    setup_core_settings()
  File "/home/csgoserver/serverfiles/csgo/addons/source-python/packages/source-python/__init__.py", line 75, in setup_core_settings
    from core.settings import _core_settings
  File "/home/csgoserver/serverfiles/csgo/addons/source-python/packages/source-python/core/__init__.py", line 27, in <module>
    from urllib.request import urlopen
  File "/home/csgoserver/serverfiles/csgo/addons/source-python/Python3/urllib/request.py", line 84, in <module>
    import base64
  File "/home/csgoserver/serverfiles/csgo/addons/source-python/Python3/base64.py", line 11, in <module>
    import binascii
ImportError: libz.so.1: cannot open shared object file: No such file or directory
[Source.Python] Failed to load the main module.
[Source.Python] Could not initialize python.
Failed to load plugin "addons/source-python"
[Source.Python] Unloading...
Traceback (most recent call last):
  File "/home/csgoserver/serverfiles/csgo/addons/source-python/packages/source-python/__init__.py", line 63, in unload
    unload_plugins()
  File "/home/csgoserver/serverfiles/csgo/addons/source-python/packages/source-python/__init__.py", line 316, in unload_plugins
    from plugins.manager import plugin_manager
  File "/home/csgoserver/serverfiles/csgo/addons/source-python/packages/source-python/plugins/__init__.py", line 12, in <module>
    from translations.strings import LangStrings
  File "/home/csgoserver/serverfiles/csgo/addons/source-python/packages/source-python/translations/strings.py", line 10, in <module>
    from binascii import unhexlify
ImportError: libz.so.1: cannot open shared object file: No such file or directory
[Source.Python] Failed to unload the main module.
[Source.Python] Unloaded successfully.


Eventually I found that I was missing the 32 bits version of the libz. One "apt install lib32z1" I try again.

Code: Select all

[Source.Python] Loading...
[SP] Encountered a Warning:
  File '../addons/source-python/packages/site-packages/mutagen/id3/_specs.py', line 666: DeprecationWarning
    invalid escape sequence \s
[SP] Caught an Exception:
Traceback (most recent call last):
  File "../addons/source-python/packages/source-python/__init__.py", line 58, in load
    setup_sqlite()
  File "../addons/source-python/packages/source-python/__init__.py", line 343, in setup_sqlite
    import ctypes
  File "../addons/source-python/Python3/ctypes/__init__.py", line 7, in <module>
    from _ctypes import Union, Structure, Array
ImportError: libffi.so.6: cannot open shared object file: No such file or directory
[Source.Python] Failed to load the main module.
[Source.Python] Could not initialize python.
Failed to load plugin "addons/source-python"
[Source.Python] Unloading...
[Source.Python] Unloaded successfully.


Yet another missing lib. And the only libffi I can find in debians repositories is already installed. No apparent 32bits version.

I'm still trying to fix that but my question is : Is there, anywhere, a proper list of dependencies for this project ? I have tried looking through the wiki, github and forum but found no such thing. I think it would be a major improvement to the wiki install section.

And in the mean time, if someone strolls through here and has a similar setup that is working, please do tell how you installed all the dependencies, it'll save me some time and brain scratching. =)

Thanks.
User avatar
iPlayer
Developer
Posts: 590
Joined: Sat Nov 14, 2015 8:37 am
Location: Moscow
Contact:

Re: Installation process

Postby iPlayer » Sun Jun 25, 2017 5:02 pm

Hey, welcome to the forums!

libffi issue is probably related to the upgrade to Python 3.6.1

I've had SP installed on Debian Jessie before, and that libz.so issue is the only one I can think of right now (besides this new libffi issue).
Image /id/its_iPlayer
My plugins: Map Cycle • Killstreaker • DeadChat • Infinite Jumping • TripMines • AdPurge • Bot Damage • PLRBots • Entity AntiSpam

Hail, Companion. [...] Hands to yourself, sneak thief. Image
User avatar
Ayuto
Project Leader
Posts: 2193
Joined: Sat Jul 07, 2012 8:17 am
Location: Germany

Re: Installation process

Postby Ayuto » Mon Jun 26, 2017 8:52 pm

I will update our wiki soon. For the meantime here are the commands to run (Debian/Ubuntu):

Code: Select all

ImportError: libz.so.1: cannot open shared object file: No such file or directory

32bit: apt-get install zlib1g
64bit: apt-get install zlib1g:i386 (or lib32z1)
   
   
ImportError: libffi.so.6: cannot open shared object file: No such file or directory

32bit: apt-get install libffi6
64bit: apt-get install libffi6:i386
kRYOoX
Junior Member
Posts: 2
Joined: Sun Jun 25, 2017 2:19 pm

Re: Installation process

Postby kRYOoX » Mon Jun 26, 2017 9:29 pm

Hello guys,

Indeed, this was related to the newer builds. Build #582 worked fine.
And after an apt-get install libffi6:i386, the newest build works fine as well.

I think those informations will be a nice addition to the Wiki. =)

Thank you both.

Return to “General Discussion”

Who is online

Users browsing this forum: No registered users and 39 guests