On 20 June 2016 at 14:13, Nathan Scott <nathans@xxxxxxxxxx> wrote:
> Hi Jamie,
>
> ----- Original Message -----
>> Install PCP:
>>
>> $ echo "deb https://dl.bintray.com/pcp/xenial xenial main" | sudo tee
>> -a /etc/apt/sources.list
>> $ sudo apt-get update
>> $ sudo apt-get install pcp pcp-gui pcp-doc python-pcp
>>
>> I think Xenial defaults to Python 3, so we get:
>>
>> $ pmrep network.interface.in.bytes
>> Traceback (most recent call last):
>> File "/usr/bin/pmrep", line 65, in <module>
>> from pcp import pmapi, pmi
>> ImportError: No module named 'pcp'
>>
>
> (yep, a relatively new missing dependency, as you found later)
>
>> Install the Python 3 bindings and try again:
>>
>> $ sudo apt-get install python3-pcp
>>
>> $ pmrep network.interface.in.bytes
>> Traceback (most recent call last):
>> File "/usr/bin/pmrep", line 65, in <module>
>> from pcp import pmapi, pmi
>> File "/usr/lib/python3/dist-packages/pcp/pmi.py", line 66, in <module>
>> LIBPCP_IMPORT.pmiDump.restype = None
>> File "/usr/lib/python3.5/ctypes/__init__.py", line 360, in __getattr__
>> func = self.__getitem__(name)
>> File "/usr/lib/python3.5/ctypes/__init__.py", line 365, in __getitem__
>> func = self._FuncPtr((name_or_ordinal, self))
>> AttributeError: python3: undefined symbol: pmiDump
>>
>> pmiostat still works when in this state.
>
> Yeah, just pmrep needs this module.
>
>> Install some random things which sound about right :)
>
> :)
>
>> $ sudo apt-get install libpcp-import1
>>
>> Now the original command works fine:
>>
>> $ pmrep network.interface.in.bytes
>>
>> Removing python3-pcp breaks it with "ImportError: No module named 'pcp'"
>> again.
>
> Ugh, new problem there. :(
>
>> I'm not sure how to fix this. Reading "Declaring relationships between
>> packages" [1] I see debian/control.master contains:
>>
>> Package: pcp
>> Depends: ..., python-pcp | python3-pcp, python | python3
>>
>> Is this a preferential order? Like it prefers "python,python-pcp" over
>> "python3,python3-pcp"? Would reversing this order make it so that
>> "python3" is preferred over "python" and would install "python3-pcp"
>> where "python3" is installed?
>
> +1 ... yes, that'd work, & we've used that approach before for readline.
>
>> Debian Jessie and Ubuntu Xenial are making Python 3 the default so
>> will have "python3" installed. Older releases without "python3" should
>> fall back to "python-pcp" I guess.
>
> *nod*
>
>> This Depends line seems to need "libpcp-import1" added to it as well.
>
> Yep, will do.
>
>> Any guidance appreciated?
>
> Looks like you've got it sorted out Jamie. :) I'll push through your
> suggested fixes shortly, let us know how they go when that arrives?
Sorry for the delay. Testing dependencies manually with "dpkg -i"
seems to work fine. Python3 packages are preferred in the desired
order, and the dependency to libpcp-import1 is there too. Thank you!
Jamie
|