Cannot load module allergy

Begonnen von en-trust, 20 April 2020, 11:53:16

Vorheriges Thema - Nächstes Thema

en-trust

Ich wollte mir nur das allergy definieren und erhalte dann die Meldung Cannot load...

Habe dann mal reload 60_allergy.pm ausgeführt...

Can't locate XML/Simple.pm in @INC (you may need to install the XML::Simple module) (@INC contains: ./FHEM/lib ./lib . /opt/perlbrew/perls/perl-5.20.3/lib/site_perl/5.20.3/armv7l-linux /opt/perlbrew/perls/perl-5.20.3/lib/site_perl/5.20.3 /opt/perlbrew/perls/perl-5.20.3/lib/5.20.3/armv7l-linux /opt/perlbrew/perls/perl-5.20.3/lib/5.20.3 ./FHEM) at ./FHEM/60_allergy.pm line 26.
BEGIN failed--compilation aborted at ./FHEM/60_allergy.pm line 26.


Kann das Modul nicht mit Perl 5.20.3 ?

KölnSolar

doch, aber Dir fehlt noch ein Paket. Müsste mit apt-get dieses libxml-simple-perl sein.

Grüße Markus
RPi3/2 buster/stretch-SamsungAV_E/N-RFXTRX-IT-RSL-NC5462-Oregon-CUL433-GT-TMBBQ-01e-CUL868-FS20-EMGZ-1W(GPIO)-DS18B20-CO2-USBRS232-USBRS422-Betty_Boop-EchoDot-OBIS(Easymeter-Q3/EMH-KW8)-PCA301(S'duino)-Deebot(mqtt2)-zigbee2mqtt

en-trust

Das ist aber installiert...

sudo apt-get install libxml-simple-perl
Reading package lists... Done
Building dependency tree
Reading state information... Done
libxml-simple-perl is already the newest version (2.22-1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

betateilchen

Es mag schon sein, dass das Paket in Deinem Betriebssystem installiert ist. Aber in Deiner perlbrew Umgebung scheint es nicht gefunden zu werden, schau Dir doch mal die Pfade an, die in @INC enthalten sind.
-----------------------
Formuliere die Aufgabe möglichst einfach und
setze die Lösung richtig um - dann wird es auch funktionieren.
-----------------------
Lesen gefährdet die Unwissenheit!

Otto123

Falls der Tipp von betateilchen nicht weiterhilft, es gab letztens offenbar auch mal einfach "kaputt" gegangen:
https://forum.fhem.de/index.php/topic,110160.msg1042559.html#msg1042559
Viele Grüße aus Leipzig  ⇉  nächster Stammtisch an der Lindennaundorfer Mühle
RaspberryPi B B+ B2 B3 B3+ ZeroW,HMLAN,HMUART,Homematic,Fritz!Box 7590,WRT3200ACS-OpenWrt,Sonos,VU+,Arduino nano,ESP8266,MQTT,Zigbee,deconz

en-trust

#5
Vielleicht liegts auch an den unterschiedlichen Perls ? Für fhem nutze ich wegen der Speicherproblematik 5.20.3 zusätzlich zur 5.24.1

perl -V | tail
  @INC:
    /etc/perl
    /usr/local/lib/arm-linux-gnueabihf/perl/5.24.1
    /usr/local/share/perl/5.24.1
    /usr/lib/arm-linux-gnueabihf/perl5/5.24
    /usr/share/perl5
    /usr/lib/arm-linux-gnueabihf/perl/5.24
    /usr/share/perl/5.24
    /usr/local/lib/site_perl
    /usr/lib/arm-linux-gnueabihf/perl-base


Neuinstallation des Moduls war erfolglos.
Ich vermute mit apt-get installiere ich das Paket für die 24er Version aber nicth die 20er. Frage wäre wie ich das dann für die 20iger hinbekomme.

en-trust


Christoph Morrison

Zitat von: en-trust am 21 April 2020, 08:59:59
Niemand eine Idee ?  :'(

Doch, nimm mal cpan-minus und mach das dann in deiner perlbrew-Umgebung.

en-trust

Bin in das Perl für fhem Verzeichnis gewechselt und habe das Modul installiert.

pi@raspberrypi:/opt/perlbrew/perls/perl-5.20.3 $ sudo cpan XML::Simple
Writing /root/.cpan/Metadata
XML::Simple is up to date (2.25).


muss ich da noch mehr tun ?

Christoph Morrison

Zitat von: en-trust am 22 April 2020, 07:40:26
muss ich da noch mehr tun ?

Lesen und machen, was ich dir im Posting vorher verlinkt habe?

en-trust

#10
Würde ich ja gerne. Aber selbst der switch klappt nicht, obwohl 5.20.3 installiert ist.

pi@raspberrypi:~ $ perlbrew switch perl-5.20.3
perl-5.20.3 is not installed
pi@raspberrypi:~ $ perlbrew switch /opt/perlbrew/perls/perl-5.20.3/
/opt/perlbrew/perls/perl-5.20.3/ is not installed


Ich hatte mir wegen der Speicherproblematik zusätzlich nach der Anleitung 5.20.3 dazu installiert.

https://forum.fhem.de/index.php/topic,84372.msg880712.html#msg880712

Christoph Morrison

Zitat von: en-trust am 22 April 2020, 12:50:05
pi@raspberrypi:~ $ perlbrew switch perl-5.20.3
perl-5.20.3 is not installed
pi@raspberrypi:~ $ perlbrew switch /opt/perlbrew/perls/perl-5.20.3/
/opt/perlbrew/perls/perl-5.20.3/ is not installed


Das ist aber ein anderes Problem. Vorher hattest du einfach im "Standardperl" installiert, nicht im perlbrew-Environment. Installiere dir die 5.20.3 doch einfach noch mal und dann machst du was ich verlinkt habe.
Übrigens: Du willst wirklich den Standard-CPAN nicht verwenden. Nimm einfach cpan-minus (kurz cpanm). Viel weniger Schmerzen mit CPAN als mit dem default client.

en-trust

#12
Nach längerer Pause habe ich perl 5.20.3 nochmal installiert. Wobei es mittlerweile ja auch schon 5.33 gibt. Es denn das Speicherproblem mit einer der neueren Versionen gelöst und kann fhem damit laufen ? Dann würde sich mein Problem ja erübrigen. Denn trotz verwandter Version findet fhem immernoch kein allergy module bzw. kann es laden.


pi@raspberrypi:~ $ perl -V | tail
    PERLBREW_ROOT="/home/pi/perl5/perlbrew"
    PERLBREW_SKIP_INIT="1"
    PERLBREW_VERSION="0.88"
    PERL_LOCAL_LIB_ROOT=""
  @INC:
    /home/pi/perl5/perlbrew/perls/perl-5.20.3/lib/site_perl/5.20.3/armv7l-linux
    /home/pi/perl5/perlbrew/perls/perl-5.20.3/lib/site_perl/5.20.3
    /home/pi/perl5/perlbrew/perls/perl-5.20.3/lib/5.20.3/armv7l-linux
    /home/pi/perl5/perlbrew/perls/perl-5.20.3/lib/5.20.3


pi@raspberrypi:~ $ perl -V
Summary of my perl5 (revision 5 version 20 subversion 3) configuration:

  Platform:
    osname=linux, osvers=5.4.51-v7+, archname=armv7l-linux
    uname='linux raspberrypi 5.4.51-v7+ #1326 smp fri jul 17 10:45:25 bst 2020 armv7l gnulinux '
    config_args='-de -Dprefix=/home/pi/perl5/perlbrew/perls/perl-5.20.3 -Aeval:scriptdir=/home/pi/perl5/perlbrew/perls/perl-5.20.3/bin'
    hint=recommended, useposix=true, d_sigaction=define
    useithreads=undef, usemultiplicity=undef
    use64bitint=undef, use64bitall=undef, uselongdouble=undef
    usemymalloc=n, bincompat5005=undef
  Compiler:
    cc='cc', ccflags ='-fwrapv -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64',
    optimize='-O2',
    cppflags='-fwrapv -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include'
    ccversion='', gccversion='6.3.0 20170516', gccosandvers=''
    intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234
    d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=8
    ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8
    alignbytes=8, prototype=define
  Linker and Libraries:
    ld='cc', ldflags =' -fstack-protector -L/usr/local/lib'
    libpth=/usr/local/lib /usr/lib/gcc/arm-linux-gnueabihf/6/include-fixed /usr/include/arm-linux-gnueabihf /usr/lib /lib/arm-linux-gnueabihf /lib /usr/lib/arm-linux-gnueabihf
    libs=-lpthread -lnsl -lgdbm -ldl -lm -lcrypt -lutil -lc -lgdbm_compat
    perllibs=-lpthread -lnsl -ldl -lm -lcrypt -lutil -lc
    libc=libc-2.24.so, so=so, useshrplib=false, libperl=libperl.a
    gnulibc_version='2.24'
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E'
    cccdlflags='-fPIC', lddlflags='-shared -O2 -L/usr/local/lib -fstack-protector'


Characteristics of this binary (from libperl):
  Compile-time options: HAS_TIMES PERLIO_LAYERS PERL_DONT_CREATE_GVSV
                        PERL_HASH_FUNC_ONE_AT_A_TIME_HARD PERL_MALLOC_WRAP
                        PERL_NEW_COPY_ON_WRITE PERL_PRESERVE_IVUV
                        USE_LARGE_FILES USE_LOCALE USE_LOCALE_COLLATE
                        USE_LOCALE_CTYPE USE_LOCALE_NUMERIC USE_PERLIO
                        USE_PERL_ATOF
  Locally applied patches:
        Devel::PatchPerl 1.90
  Built under linux
  Compiled at Sep 28 2020 14:10:21
  %ENV:
    PERL5LIB=""
    PERLBREW_LIB=""
    PERLBREW_MANPATH="/home/pi/perl5/perlbrew/perls/perl-5.20.3/man"
    PERLBREW_PATH="/home/pi/perl5/perlbrew/bin:/home/pi/perl5/perlbrew/perls/perl-5.20.3/bin"
    PERLBREW_PERL="perl-5.20.3"
    PERLBREW_ROOT="/home/pi/perl5/perlbrew"
    PERLBREW_SKIP_INIT="1"
    PERLBREW_VERSION="0.88"
    PERL_LOCAL_LIB_ROOT=""
  @INC:
    /home/pi/perl5/perlbrew/perls/perl-5.20.3/lib/site_perl/5.20.3/armv7l-linux
    /home/pi/perl5/perlbrew/perls/perl-5.20.3/lib/site_perl/5.20.3
    /home/pi/perl5/perlbrew/perls/perl-5.20.3/lib/5.20.3/armv7l-linux
    /home/pi/perl5/perlbrew/perls/perl-5.20.3/lib/5.20.3
    .
pi@raspberrypi:~ $


reload des 60 Moduls ergab...
Can't locate XML/Simple.pm in @INC (you may need to install the XML::Simple module) (@INC contains: ./FHEM/lib ./lib ./FHEM . /opt/perlbrew/perls/perl-5.20.3/lib/site_perl/5.20.3/armv7l-linux /opt/perlbrew/perls/perl-5.20.3/lib/site_perl/5.20.3 /opt/perlbrew/perls/perl-5.20.3/lib/5.20.3/armv7l-linux /opt/perlbrew/perls/perl-5.20.3/lib/5.20.3) at ./FHEM/60_allergy.pm line 26.
BEGIN failed--compilation aborted at ./FHEM/60_allergy.pm line 26.


das Modul xml:simple hatte ich aber ins 20.3 mit cpan XML::Simple hinzugefügt.

perlbrew list-modules
App::cpanminus
Date::Parse
Email::Date::Format
Email::Simple
Encode
Encode::Locale
ExtUtils::Config
ExtUtils::Helpers
ExtUtils::InstallPaths
File::Listing
HTML::Parser
HTML::Tagset
HTTP::Cookies
HTTP::Daemon
HTTP::Date
HTTP::Message
HTTP::Negotiate
IO::HTML
LWP::MediaTypes
Module::Build::Tiny
Net::HTTP
Test::Fatal
Test::LeakTrace
Test::Needs
Test::RequiresInternet
Time::Local
Try::Tiny
URI
WWW::RobotRules
XML::NamespaceSupport
XML::Parser
XML::SAX
XML::SAX::Base
XML::SAX::Expat
XML::Simple
libwww::perl


en-trust

Bin ratlos...
Ein reload des allergy.pm sagt...
Can't locate XML/Simple.pm in @INC (you may need to install the XML::Simple module) (@INC contains: ./FHEM/lib ./lib ./FHEM . /opt/perlbrew/perls/perl-5.20.3/lib/site_perl/5.20.3/armv7l-linux /opt/perlbrew/perls/perl-5.20.3/lib/site_perl/5.20.3 /opt/perlbrew/perls/perl-5.20.3/lib/5.20.3/armv7l-linux /opt/perlbrew/perls/perl-5.20.3/lib/5.20.3) at ./FHEM/60_allergy.pm line 26.
BEGIN failed--compilation aborted at ./FHEM/60_allergy.pm line 26.


perl -V hingegen...
  @INC:
    /home/pi/perl5/perlbrew/perls/perl-5.20.3/lib/site_perl/5.20.3/armv7l-linux
    /home/pi/perl5/perlbrew/perls/perl-5.20.3/lib/site_perl/5.20.3
    /home/pi/perl5/perlbrew/perls/perl-5.20.3/lib/5.20.3/armv7l-linux
    /home/pi/perl5/perlbrew/perls/perl-5.20.3/lib/5.20.3


perlbrew und xml_simple hab ich alles ohne sudo neu installiert. Aber irgendwie fehlt die Referenz zum genutzen perl.

Christoph Morrison

Du hast irgendwo eine Umgebungsvariable gesetzt (bekommen). Guck mal in .profile oder .bashrc.