Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[Solved] Python broke
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
chi86
Apprentice
Apprentice


Joined: 30 Jul 2013
Posts: 164
Location: Austria

PostPosted: Tue Dec 22, 2015 8:17 am    Post subject: [Solved] Python broke Reply with quote

Hi,
Iupdated ma system which failed while emergeing dev-python/matplotlib. After that, when Ii tried to execute "emerge" I get:
Code:
bash: emerge: command not found

I figured out that the link to emerge broke:
Code:
lrwxrwxrwx   1 root     root           31 Dec 21 19:30 emerge -> ../lib/python-exec/python-exec2
-rwxr-xr-x   1 root     root        14221 Oct  7 23:49 emerge-webrsync
-rwxr-xr-x   1 root     root          229 Jun 26 15:28 emerge_with_indexing_for_cfg-update
-rwxr-xr-x   1 root     root         1147 Jun 26 15:28 emerge_with_indexing_for_cfg-update_bashhelper
-rwxr-xr-x   1 root     root          600 Jun 26 15:28 emerge_with_indexing_for_cfg-update_phphelper

I found an entry here which described how to remake and install python again https://forums.gentoo.org/viewtopic-t-5746.html, which worked but I had to download it from XXX myself and I decided to use the Python3.4 because I used that before aswell!
My emerge still wont work and I don't know how to fix it. Any idears?

I would put here a recent emerge --info but it wont work ;). Thats about a week old:

Code:

# emerge --info
Portage 2.2.20.1 (python 2.7.10-final-0, default/linux/amd64/13.0/desktop/gnome/systemd, gcc-4.9.3, glibc-2.21-r1, 4.0.9-gentoo x86_64)
=================================================================
System uname: Linux-4.0.9-gentoo-x86_64-AMD_Phenom-tm-_II_X4_955_Processor-with-gentoo-2.2
KiB Mem:    16433856 total,   1339176 free
KiB Swap:    1048572 total,   1048572 free
Timestamp of repository gentoo: Mon, 14 Dec 2015 07:00:01 +0000
sh bash 4.3_p39
ld GNU ld (Gentoo 2.25.1 p1.1) 2.25.1
app-shells/bash:          4.3_p39::gentoo
dev-java/java-config:     2.2.0::gentoo
dev-lang/perl:            5.20.2::gentoo
dev-lang/python:          2.7.10-r1::gentoo, 3.4.3-r2::gentoo
dev-util/cmake:           3.3.1-r1::gentoo
dev-util/pkgconfig:       0.28-r2::gentoo
sys-apps/baselayout:      2.2::gentoo
sys-apps/openrc:          0.17::gentoo
sys-apps/sandbox:         2.6-r1::gentoo
sys-devel/autoconf:       2.13::gentoo, 2.69::gentoo
sys-devel/automake:       1.11.6-r1::gentoo, 1.14.1::gentoo, 1.15::gentoo
sys-devel/binutils:       2.25.1-r1::gentoo
sys-devel/gcc:            4.9.3::gentoo
sys-devel/gcc-config:     1.7.3::gentoo
sys-devel/libtool:        2.4.6::gentoo
sys-devel/make:           4.1-r1::gentoo
sys-kernel/linux-headers: 3.18::gentoo (virtual/os-headers)
sys-libs/glibc:           2.21-r1::gentoo
Repositories:

gentoo
    location: /usr/portage
    sync-type: rsync
    sync-uri: rsync://rsync.gentoo.org/gentoo-portage
    priority: -1000

aegypius
    location: /var/lib/layman/aegypius
    masters: gentoo
    priority: 50

sage-on-gentoo
    location: /var/lib/layman/sage-on-gentoo
    masters: gentoo science
    priority: 50

science
    location: /var/lib/layman/science
    masters: gentoo
    priority: 50

ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -march=athlon64 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/lib64/libreoffice/program/sofficerc /usr/share/gnupg/qualified.txt"
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.6/ext-active/ /etc/php/cgi-php5.6/ext-active/ /etc/php/cli-php5.6/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 -pipe"
DISTDIR="/usr/portage/distfiles"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs 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 xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://gentoo.inode.at/ ftp://gentoo.inode.at/source/"
LANG="en_US.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j5"
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"
USE="X a52 aac acl acpi alsa amd64 apache2 berkdb bitmap-fonts bluetooth branding bzip2 cairo cdda cdr cleartype cli colord corefonts cracklib crypt cups cxx dbus dri dts dvd dvdr eds emboss encode evo exif fam firefox flac fortran gdbm gif git glamor gnome gnome-keyring gnome-online-accounts gpm gstreamer gtk gzip iconv introspection ipv6 jpeg lcms ldap libnotify libsecret mad mikmod mmx mmxext mng modules mp3 mp4 mpeg mulitilib multilib nautilus ncurses nls nptl nsplugin ogg opengl openmp openmpi pam pango pcre pdf png policykit ppds pulseaudio qt3support qt4 readline scanner sdl seccomp session spell sse sse2 ssl startup-notification subversion svg systemd tcpd threads tiff tracker truetype type1 udev udisks unicode upower usb vim-syntax vorbis wxwidgets x264 xattr xcb xml xv xvid zlib" ABI_X86="64 32" 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" APACHE2_MPMS="prefork" 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" CPU_FLAGS_X86="3dnow 3dnowext mmx mmxext popcnt sse sse2 sse3 sse4a" 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 ublox ubx" INPUT_DEVICES="evdev synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="en" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5" PYTHON_SINGLE_TARGET="python3_4" PYTHON_TARGETS="python3_4 python2_7" RUBY_TARGETS="ruby20 ruby21" USERLAND="GNU" VIDEO_CARDS="radeon" 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"
USE_PYTHON="3.4 2.7"
Unset:  CC, CPPFLAGS, CTARGET, CXX, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS


And before I did the update I followed this: https://wiki.gentoo.org/wiki/User_talk:Houseofsuns because I had some issues with cblas!


Last edited by chi86 on Thu Jan 07, 2016 1:45 pm; edited 1 time in total
Back to top
View user's profile Send private message
SpaceToast
n00b
n00b


Joined: 16 Oct 2015
Posts: 19

PostPosted: Fri Dec 25, 2015 2:47 am    Post subject: Reply with quote

This looks like a case of python-exec getting broken (never use that manually). First of all, you need to locate the actual emerge script. My guess would place it in /usr/lib/python-exec/python2.7/emerge. (It might be somewhere else in there, but /usr/lib/python-exec is definitely the general location).

Once you do that, can you try running
Code:
emerge -1 python-exec
(replacing emerge with the absolute path to the script you found) and see if that helps?
Back to top
View user's profile Send private message
paulj
Guru
Guru


Joined: 30 Sep 2004
Posts: 422
Location: Wales, UK

PostPosted: Sun Dec 27, 2015 6:49 pm    Post subject: Reply with quote

I had this problem, after emerging dev-lang/python-exec-2.9999. As pointed out by spacetoast, I found the emerge script in /usr/lib/python-exec/python2.7/emerge, and ran:

Code:
/usr/lib/python-exec/python2.7/emerge -1 python-exec


having first removed the line in package.keywords which allowed python-exec-2.9999 to be installed. This was in fact quite a stale link, and this version of python-exec has been installed before without problems. Once version 2.0.1-r1 was installed, the original directory was restored, and the system returned to normal.

edit: Fixed spelling mistake in spacetoast's name
Back to top
View user's profile Send private message
chi86
Apprentice
Apprentice


Joined: 30 Jul 2013
Posts: 164
Location: Austria

PostPosted: Mon Jan 04, 2016 6:09 am    Post subject: Reply with quote

paulj wrote:
I had this problem, after emerging dev-lang/python-exec-2.9999. As pointed out by spacetoast, I found the emerge script in /usr/lib/python-exec/python2.7/emerge, and ran:

Code:
/usr/lib/python-exec/python2.7/emerge -1 python-exec


having first removed the line in package.keywords which allowed python-exec-2.9999 to be installed. This was in fact quite a stale link, and this version of python-exec has been installed before without problems. Once version 2.0.1-r1 was installed, the original directory was restored, and the system returned to normal.

edit: Fixed spelling mistake in spacetoast's name


Thx for the help! I did that and everthing went perfectly fine and it emerged python-exec but emerge is still not working ;(
Back to top
View user's profile Send private message
SpaceToast
n00b
n00b


Joined: 16 Oct 2015
Posts: 19

PostPosted: Wed Jan 06, 2016 5:26 pm    Post subject: Reply with quote

Ok, so it's fairly obvious that your /usr/bin/emerge is acting weird.

It's supposed to be a symbolic link to /usr/lib/python-exec/python-exec2...
Can you check what it actually is?
Code:
ls -l $(which emerge)
Back to top
View user's profile Send private message
chi86
Apprentice
Apprentice


Joined: 30 Jul 2013
Posts: 164
Location: Austria

PostPosted: Thu Jan 07, 2016 7:15 am    Post subject: Reply with quote

SpaceToast wrote:

Code:
ls -l $(which emerge)


It says it can't find it:
Code:
which: no emerge in (/sbin:/bin:/usr/sbin:/usr/bin)

is there a way to rebuild all symbolic links?
Back to top
View user's profile Send private message
chi86
Apprentice
Apprentice


Joined: 30 Jul 2013
Posts: 164
Location: Austria

PostPosted: Thu Jan 07, 2016 1:44 pm    Post subject: Reply with quote

I solved the problem by deleting the broken links and replacing them with the correct links!
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo 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