Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[gelöst] portage python problem mit emerge script
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Deutsches Forum (German)
View previous topic :: View next topic  
Author Message
Tranalogic1987
Tux's lil' helper
Tux's lil' helper


Joined: 27 Oct 2004
Posts: 91
Location: Schwechat / Austria

PostPosted: Mon Nov 04, 2013 8:18 pm    Post subject: [gelöst] portage python problem mit emerge script Reply with quote

Hallo ihr Tuxer! ;)

Ich habe seit gestern ein Problem mit meinem Portage. Ich habe testweise das systemd Profile ausgewählt und auch python-3.3 installiert.

Ich bekomme bei jedem Aufruf von emerge folgende Ausgabe:
Code:
zaepfchen ~ # emerge
/usr/bin/emerge: Zeile 5: from: Kommando nicht gefunden.
/usr/bin/emerge: Zeile 7: import: Kommando nicht gefunden.
/usr/bin/emerge: Zeile 8: import: Kommando nicht gefunden.
/usr/bin/emerge: Zeile 9: import: Kommando nicht gefunden.
/usr/bin/emerge: Zeile 16: try:: Kommando nicht gefunden.
/usr/bin/emerge: Zeile 18: Syntaxfehler beim unerwarteten Wort `('
/usr/bin/emerge: Zeile 18: `   def exithandler(signum,frame):'


Ich vermutete, dass es eine radikale Änderung von python3.3 gab, also habe ich python3.3 wieder gelöscht.
Das Problem ist aber, dass die Meldung auch mit 3.2 und 2.7 auftritt.

Wenn ich aber emerge direkt mit "python2.7 /usr/bin/emerge" ausführe, funktioniert es so weit.
Nur das eigentliche Problem beginnt nach dem kompilieren. Ich bekomme immer folgende Meldung (in diesem Sinne bei python-exec (<welches auch nicht installiert ist))
Quote:
make[2]: Entering directory `/var/tmp/portage/dev-lang/python-exec-2.0/work/python-exec-2.0_build'
make[2]: Für das Ziel »install-exec-am« ist nichts zu tun.
/bin/mkdir -p '/var/tmp/portage/dev-lang/python-exec-2.0/image//usr/lib/python-exec'
/bin/mkdir -p '/var/tmp/portage/dev-lang/python-exec-2.0/image//usr/lib/python-exec'
/usr/bin/install -c python-exec2 '/var/tmp/portage/dev-lang/python-exec-2.0/image//usr/lib/python-exec'
/usr/bin/install -c python-exec2-c '/var/tmp/portage/dev-lang/python-exec-2.0/image//usr/lib/python-exec'
make[2]: Leaving directory `/var/tmp/portage/dev-lang/python-exec-2.0/work/python-exec-2.0_build'
make[1]: Leaving directory `/var/tmp/portage/dev-lang/python-exec-2.0/work/python-exec-2.0_build'
/usr/lib64/portage/bin/eapi.sh: Zeile 99: `___eapi_best_version_and_has_version_support_--host-root': Ist kein gültiger Bezeichner.
* ERROR: dev-lang/python-exec-2.0::gentoo failed (install phase):
* (default) dodoc NEWS failed
*
* Call stack:
* ebuild.sh, line 93: Called src_install
* environment, line 4168: Called autotools-utils_src_install
* environment, line 960: Called die
* The specific snippet of code:
* dodoc "${f}" || die "(default) dodoc ${f} failed";
*
* If you need support, post the output of `emerge --info '=dev-lang/python-exec-2.0::gentoo'`,
* the complete build log and the output of `emerge -pqv '=dev-lang/python-exec-2.0::gentoo'`.
* The complete build log is located at '/var/tmp/portage/dev-lang/python-exec-2.0/temp/build.log'.
* The ebuild environment file is located at '/var/tmp/portage/dev-lang/python-exec-2.0/temp/environment'.
* Working directory: '/var/tmp/portage/dev-lang/python-exec-2.0/work/python-exec-2.0'
* S: '/var/tmp/portage/dev-lang/python-exec-2.0/work/python-exec-2.0'

>>> Failed to emerge dev-lang/python-exec-2.0, Log file:

>>> '/var/tmp/portage/dev-lang/python-exec-2.0/temp/build.log'

* Messages for package dev-lang/python-exec-2.0:

* ERROR: dev-lang/python-exec-2.0::gentoo failed (install phase):
* (default) dodoc NEWS failed
*
* Call stack:
* ebuild.sh, line 93: Called src_install
* environment, line 4168: Called autotools-utils_src_install
* environment, line 960: Called die
* The specific snippet of code:
* dodoc "${f}" || die "(default) dodoc ${f} failed";
*
* If you need support, post the output of `emerge --info '=dev-lang/python-exec-2.0::gentoo'`,
* the complete build log and the output of `emerge -pqv '=dev-lang/python-exec-2.0::gentoo'`.
* The complete build log is located at '/var/tmp/portage/dev-lang/python-exec-2.0/temp/build.log'.
* The ebuild environment file is located at '/var/tmp/portage/dev-lang/python-exec-2.0/temp/environment'.
* Working directory: '/var/tmp/portage/dev-lang/python-exec-2.0/work/python-exec-2.0'
* S: '/var/tmp/portage/dev-lang/python-exec-2.0/work/python-exec-2.0'


Ich hab den Fehler mal herausgehoben. Nun meine Frage, was kann ich jetzt dagegen tun? Habe schon probiert, Portage händisch zu kompilieren, ohne Erfolg.

Bin für jede info dankbar.

PS: meine emerge --info
Code:
zaepfchen ~ # python /usr/bin/emerge --info
Portage 2.2.7 (default/linux/amd64/13.0/desktop/gnome/systemd, gcc-4.8.1, glibc-2.15-r3, 3.11.6-gentoo-zaepfchen x86_64)
=================================================================
System uname: Linux-3.11.6-gentoo-zaepfchen-x86_64-AMD_Athlon-tm-_64_Processor_3500+-with-gentoo-2.2
KiB Mem:     1025708 total,    730984 free
KiB Swap:    2008120 total,   2000448 free
Timestamp of tree: Sun, 03 Nov 2013 21:00:01 +0000
ld GNU ld (GNU Binutils) 2.23.2
ccache version 3.1.9 [enabled]
app-shells/bash:          4.2_p45
dev-java/java-config:     2.1.12-r1
dev-lang/python:          2.7.5-r2, 3.2.5-r3
dev-util/ccache:          3.1.9
dev-util/cmake:           2.8.9
dev-util/pkgconfig:       0.28
sys-apps/baselayout:      2.2
sys-apps/openrc:          0.12.3
sys-apps/sandbox:         2.6-r1
sys-devel/autoconf:       2.13, 2.69
sys-devel/automake:       1.9.6-r3, 1.10.3, 1.11.6, 1.12.6
sys-devel/binutils:       2.23.2
sys-devel/gcc:            4.6.3, 4.8.1-r1
sys-devel/gcc-config:     1.7.3
sys-devel/libtool:        2.4-r1
sys-devel/make:           3.82-r4
sys-kernel/linux-headers: 3.9 (virtual/os-headers)
sys-libs/glibc:           2.15-r3
Repositories: gentoo
ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -msse2 -march=athlon64 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt /usr/share/polkit-1/actions /var/lib/hsqldb"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.4/ext-active/ /etc/php/cgi-php5.4/ext-active/ /etc/php/cli-php5.4/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-O2 -msse2 -march=athlon64 -pipe"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--autounmask=y"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs ccache config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://gentoo.inode.at/ ftp://gentoo.inode.at/source/ http://gd.tuwien.ac.at/opsys/linux/gentoo/ ftp://gd.tuwien.ac.at/opsys/linux/gentoo/ ftp://ftp.rz.tu-bs.de/pub/mirror/ftp.gentoo.org/gentoo-distfiles/"
LANG="de_AT.UTF-8"
LC_ALL="de_AT.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY=""
USE="3dnow 3dnowext X a52 aac acl acpi alisp alsa amd64 avahi berkdb branding bzip2 cairo cdda cddb cdr cdrom cdrw chm cli colord cracklib crypt css cups cxx divx doc dri dts dvd dvdr dvdread dvdrw ebook eds emboss encode evo exif fam ffmpeg firefox flac fontconfig fontforge fortran gcj gdbm gdu gif gmedia gnome gnome-keyring gnome-online-accounts gnutls gphoto2 gpm gstreamer gtk gtk+ gtkhtml hddtemp i18n iconv id3tag ieee1394 introspection jpeg jpeg2k kde kdrive lame lcms ldap libnotify libsamplerate libsecret lm_sensors lzma mad md5sum mmx mmxext mng modules mono mp2 mp3 mp4 mpeg mtp mudflap multilib musepack nautilus ncurses networkmanager nls nptl nsplugin nvidia objc objc++ objc-gc ogg ole opengl openmp oscar pam pango pcre pdf perl playlist png policykit ppds pulseaudio python python3 qt qt3support qt4 rar readline remote ruby samba sasl sdl semantic-desktop sensord session skins slang sndfile socialweb sox spell sql sqlite3 sse sse2 sse3 ssl startup-notification stream svg symlink systemd taglib tcpd templates threads tiff tk truetype twolame type3 udev udisks unicode upower usb v4l v4l2 vcd vorbis wavpack wmf wmp wxwidgets wxwindows x264 xcb xine xml xpm xscreensaver xv xvid zip zlib" ABI_X86="64" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="de" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7" RUBY_TARGETS="ruby20" USERLAND="GNU" VIDEO_CARDS="nvidia nv" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CPPFLAGS, CTARGET, INSTALL_MASK, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, SYNC, USE_PYTHON


MfG :wink:
_________________
System: Gentoo 2005.1, Gnome 2.18.x, Linux: 2.6.x-gentoo on an AMD Athlon64 Machine :)


Last edited by Tranalogic1987 on Wed Nov 06, 2013 4:19 pm; edited 1 time in total
Back to top
View user's profile Send private message
musv
Advocate
Advocate


Joined: 01 Dec 2002
Posts: 3333
Location: de

PostPosted: Mon Nov 04, 2013 11:53 pm    Post subject: Reply with quote

Eigentlich komisch, bei mir hat Portage mit Python-3.3 funktioniert. Bin aber aus irgendwelchen Gründen, die ich nicht mehr weiß, auf Python-3.2 zurückgegangen.

1. Welche Pythonversion ist bei Dir gesetzt?
Code:
eselect python list


2. Hast du das Use-Flag beachtet?
Code:
/usr/portage/profiles/use.local.desc:sys-apps/portage:python3 - Use python3 as Python interpreter.


3. Python-Updater ausgeführt?
Code:
python-updater
Back to top
View user's profile Send private message
Genone
Retired Dev
Retired Dev


Joined: 14 Mar 2003
Posts: 9501
Location: beyond the rim

PostPosted: Tue Nov 05, 2013 3:00 pm    Post subject: Reply with quote

Die Fehlermeldungen sehen so aus als ob die Shell versucht das Python Skript auszuführen. Wie lautet denn die erste Zeile in /usr/bin/emerge? Kann mir zwar nicht wirklich vorstellen dass systemd darauf Einfluss hat, aber ausschliessen will ich es nicht.

Der zweite Fehler ist wahrscheinlich eher ein Folgefehler evtl. auch durch Reparaturversuche.
Back to top
View user's profile Send private message
Tranalogic1987
Tux's lil' helper
Tux's lil' helper


Joined: 27 Oct 2004
Posts: 91
Location: Schwechat / Austria

PostPosted: Tue Nov 05, 2013 7:44 pm    Post subject: Reply with quote

Danke erstmal für eure Antworten.

eselect python list:
Code:
zaepfchen ~ # eselect python list
Available Python interpreters:
  [1]   python2.7
  [2]   python3.2 *


python3 use flag ist gesetzt.

edit:
bei python-update bekomme ich folgenden Fehler:
Code:
zaepfchen ~ # python-updater
/usr/bin/portageq: Zeile 5: from: Kommando nicht gefunden.
/usr/bin/portageq: Zeile 7: import: Kommando nicht gefunden.
/usr/bin/portageq: Zeile 8: import: Kommando nicht gefunden.
/usr/bin/portageq: Zeile 10: try:: Kommando nicht gefunden.
/usr/bin/portageq: Zeile 12: Syntaxfehler beim unerwarteten Wort `('
/usr/bin/portageq: Zeile 12: `   def exithandler(signum, frame):'
/usr/bin/portageq: Zeile 5: from: Kommando nicht gefunden.
/usr/bin/portageq: Zeile 7: import: Kommando nicht gefunden.
/usr/bin/portageq: Zeile 8: import: Kommando nicht gefunden.
/usr/bin/portageq: Zeile 10: try:: Kommando nicht gefunden.
/usr/bin/portageq: Zeile 12: Syntaxfehler beim unerwarteten Wort `('
/usr/bin/portageq: Zeile 12: `   def exithandler(signum, frame):'
 * Python 2 and Python 3 not installed

und bei python /usr/sbin/python-updater
Code:
zaepfchen ~ # python /usr/sbin/python-updater
  File "/usr/sbin/python-updater", line 23
    if [[ "${BASH_VERSINFO[0]}" -lt 4 ]]; then
                                    ^
SyntaxError: invalid syntax


erste Zeile von emerge:

Code:
#!/usr/bin/python3


ich hatte schon probiert es auf python2.7 bzw. python alleine zu ändern, aber ohne Erfolg.
_________________
System: Gentoo 2005.1, Gnome 2.18.x, Linux: 2.6.x-gentoo on an AMD Athlon64 Machine :)
Back to top
View user's profile Send private message
Genone
Retired Dev
Retired Dev


Joined: 14 Mar 2003
Posts: 9501
Location: beyond the rim

PostPosted: Wed Nov 06, 2013 8:23 am    Post subject: Reply with quote

Tranalogic1987 wrote:
und bei python /usr/sbin/python-updater
Code:
zaepfchen ~ # python /usr/sbin/python-updater
  File "/usr/sbin/python-updater", line 23
    if [[ "${BASH_VERSINFO[0]}" -lt 4 ]]; then
                                    ^
SyntaxError: invalid syntax

Ist ein bash Skript, das mag python natürlich nicht, der Fehler weiter oben kommt von einem darin aufgerufenen python Skript, das offenbar wieder von bash ausgeführt wird.

Quote:
erste Zeile von emerge:

Code:
#!/usr/bin/python3


ich hatte schon probiert es auf python2.7 bzw. python alleine zu ändern, aber ohne Erfolg.

Und /usr/bin/python3 startet auch wirklich python?

Wenn du eine Datei mytestscript mit
Code:
#!/usr/bin/python

import sys
x = [d for d in sys.path if d.startswith("/usr")]

anlegst, mit chmod +x ausführbar machst und versuchst die mit ./mytestscript versuchst auszuführen (ohne vorangestelltes python) kommen dann ähnliche Fehler?
Back to top
View user's profile Send private message
schmidicom
Veteran
Veteran


Joined: 09 Mar 2006
Posts: 1914
Location: Schweiz

PostPosted: Wed Nov 06, 2013 12:02 pm    Post subject: Reply with quote

Ist nur ein schuss ins blaue aber wenn die erste Zeile ( #! ) in einem Script nicht interpretiert wird fehlt ja möglicherweise im Kernel das "CONFIG_BINFMT_SCRIPT=y"?

Quote:
CONFIG_BINFMT_SCRIPT:

Say Y here if you want to execute interpreted scripts starting with
#! followed by the path to an interpreter.

You can build this support as a module; however, until that module
gets loaded, you cannot run scripts. Thus, if you want to load this
module from an initramfs, the portion of the initramfs before loading
this module must consist of compiled binaries only.

Most systems will not boot if you say M or N here. If unsure, say Y.

_________________
Lenovo - ThinkPad P16s Gen 2 - 21K9CTO1WW
Back to top
View user's profile Send private message
Tranalogic1987
Tux's lil' helper
Tux's lil' helper


Joined: 27 Oct 2004
Posts: 91
Location: Schwechat / Austria

PostPosted: Wed Nov 06, 2013 4:19 pm    Post subject: Reply with quote

schmidicom wrote:
Ist nur ein schuss ins blaue aber wenn die erste Zeile ( #! ) in einem Script nicht interpretiert wird fehlt ja möglicherweise im Kernel das "CONFIG_BINFMT_SCRIPT=y"?

Quote:
CONFIG_BINFMT_SCRIPT:

Say Y here if you want to execute interpreted scripts starting with
#! followed by the path to an interpreter.

You can build this support as a module; however, until that module
gets loaded, you cannot run scripts. Thus, if you want to load this
module from an initramfs, the portion of the initramfs before loading
this module must consist of compiled binaries only.

Most systems will not boot if you say M or N here. If unsure, say Y.


Hab jetzt einen älteren Kernel gebootet und es funktioniert wieder? Sehr seltsam, das wußte ich nicht, dass der Kernel für solche Angelegenheiten eine eigene Option hat.

Vielen Dank Genone für deine Tipps und deine Zeit. :) Und auch dir schmidicom und musv. ;)

Danke und schönen Abend. :)

LG
_________________
System: Gentoo 2005.1, Gnome 2.18.x, Linux: 2.6.x-gentoo on an AMD Athlon64 Machine :)
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Deutsches Forum (German) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum