Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
python-exec
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
theo.nicolau
n00b
n00b


Joined: 19 Aug 2004
Posts: 31

PostPosted: Tue Jan 20, 2015 9:48 am    Post subject: python-exec Reply with quote

Hi all,

I've done something stupid...

1421099577: *** emerge --unmerge dev-lang/python-exec
1421099582: === Unmerging... (dev-lang/python-exec-0.3.1-r1)
1421099586: >>> unmerge success: dev-lang/python-exec-0.3.1-r1
1421099586: === Unmerging... (dev-lang/python-exec-2.0.1-r1)
1421099589: >>> unmerge success: dev-lang/python-exec-2.0.1-r1
1421099589: *** exiting successfully.

now I do not have emerge anymore:

#emerge
bash: emerge: command not found

Any suggestions?

Thanks,
Theo
Back to top
View user's profile Send private message
khayyam
Watchman
Watchman


Joined: 07 Jun 2012
Posts: 6227
Location: Room 101

PostPosted: Tue Jan 20, 2015 10:32 am    Post subject: Reply with quote

theo.nicolau ...

grab the package from tinderbox (noting your arch) ... unpack into / and 'emerge --oneshot python-exec' ... should work.

eg:
Code:
# wget http://tinderbox.dev.gentoo.org/default-linux/amd64/dev-lang/python-exec-2.0.1-r1.tbz2
# tar -jxpf python-exec-2.0.1-r1.tbz2 -C /
# emerge --oneshot python-exec

HTH & best ... khay
Back to top
View user's profile Send private message
theo.nicolau
n00b
n00b


Joined: 19 Aug 2004
Posts: 31

PostPosted: Tue Jan 20, 2015 11:11 am    Post subject: Reply with quote

thanks for the quick reply.

now I get this:
emerge --oneshot python-exec
/usr/bin/emerge: no supported Python implementation variant found!


#eselect python list
Available Python interpreters:
[1] python2.7
[2] python3.2
[3] python3.3 *
[4] python3.4

Theo
Back to top
View user's profile Send private message
khayyam
Watchman
Watchman


Joined: 07 Jun 2012
Posts: 6227
Location: Room 101

PostPosted: Tue Jan 20, 2015 11:18 am    Post subject: Reply with quote

theo.nicolau wrote:
thanks for the quick reply.

theo.nicolau ... you're welcome.

theo.nicolau wrote:
now I get this: /usr/bin/emerge: no supported Python implementation variant found!

Yes, I half expected as much ... the binpkg will no doubt be built with PYTHON_TARGETS=python2.7 ... and so have /usr/lib/python-exec/python-exec2.

theo.nicolau wrote:
Code:
# eselect python list
Available Python interpreters:
  [1]   python2.7
  [2]   python3.2
  [3]   python3.3 *
  [4]   python3.4

You should be able to resolve this by setting the default python to python2.7 and re-merging python-exec with the following:

Code:
# PYTHON_TARGETS="python2_7 python3_3 python3_4" emerge --oneshot python-exec

You should be then able to set it back to python3.3

EDIT: you still have /usr/lib/python-exec/python{2.7,3.3,3.4} right?

HTH & best ... khay
Back to top
View user's profile Send private message
theo.nicolau
n00b
n00b


Joined: 19 Aug 2004
Posts: 31

PostPosted: Tue Jan 20, 2015 1:38 pm    Post subject: Reply with quote

Hi khayyam,

didn't worked...
there is a mess withe environment variable ... I had to export LD_LIBRARY_PATH to find libstdc++.so.6 to be able to startx.

Code:
# PYTHON_TARGETS="python2_7 python3_3 python3_4" emerge --oneshot python-exec


... did not worked with the same error: /usr/bin/emerge: no supported Python implementation variant found!


and no, there is no usr/lib/python-exec/python{2.7,3.3,3.4}.

Code:

#ll /usr/lib/python-exec
-rwxr-xr-x 1 root root  1462 Jan 19 11:00 python-exec2
-rwxr-xr-x 1 root root 10288 Jan 19 11:00 python-exec2-c


Any other idea?

Thanks,
Theo
Back to top
View user's profile Send private message
theo.nicolau
n00b
n00b


Joined: 19 Aug 2004
Posts: 31

PostPosted: Tue Jan 20, 2015 1:46 pm    Post subject: Reply with quote

something else looks strange....

I have also vmware-workstation installed.
Now, it does not even start... there is no vmware folder in /usr/lib/

Code:

#ll /usr/lib/
total 4
drwxr-xr-x 2 root root 4096 Jan 19 11:00 python-exec



Do you think there is a chance to fix it or maybe it's time to reinstall... this is a 7 years old installation :)

thanks,
Theo
Back to top
View user's profile Send private message
khayyam
Watchman
Watchman


Joined: 07 Jun 2012
Posts: 6227
Location: Room 101

PostPosted: Tue Jan 20, 2015 2:03 pm    Post subject: Reply with quote

theo.nicolau wrote:
and no, there is no usr/lib/python-exec/python{2.7,3.3,3.4}.

theo.nicolau ... ok, unmerging python-exec has trashed your /usr/lib/python-exec/python{2.7,3.3,3.4} ... this is where the packages (including portage) will install its scripts. So, for example:

Code:
# ls -l /usr/bin/emerge
lrwxrwxrwx 1 root root 31 2014-12-15 09:19 /usr/bin/emerge -> ../lib/python-exec/python-exec2
# file /usr/lib/python-exec/python2.7/emerge
/usr/lib/python-exec/python2.7/emerge: Python script, ASCII text executable

You might still be able to fix the issue by installing portage via the same tinderbox ... but then you would need to re-merge all packages to replace those expunged from */python-exec/python{2.7,3.3,3.4}

I've not done this ... but something like the following should work:

Code:
# emerge --oneshot --ask $(equery -C belongs -n $(find /var/db/pkg/ -name "CONTENTS" -exec awk '/^obj\s\/usr\/lib\/python-exec/{print $2}' {} +))

HTH & best ... khay
Back to top
View user's profile Send private message
theo.nicolau
n00b
n00b


Joined: 19 Aug 2004
Posts: 31

PostPosted: Tue Jan 20, 2015 2:13 pm    Post subject: Reply with quote

Thanks for your help khayyam but emerge or equery is not working... it's like the chichen/egg issue :)

I think I'll reinstall.

best regards,
Theo
Back to top
View user's profile Send private message
khayyam
Watchman
Watchman


Joined: 07 Jun 2012
Posts: 6227
Location: Room 101

PostPosted: Tue Jan 20, 2015 6:44 pm    Post subject: Reply with quote

theo.nicolau wrote:
Thanks for your help khayyam but emerge or equery is not working... it's like the chichen/egg issue

Theo ... yeah, I thought about that as I was cycling away from the house earlier. Its not so much a chicken & egg problem, but equery would likewise need to have the missing python2.7/equery. I'm sure you could probably fix things once portage is working (which you should be able to do via a package from tinderbox). Anyhow, if you've decided to reinstall then all that is moot.

best ... khay
Back to top
View user's profile Send private message
szatox
Advocate
Advocate


Joined: 27 Aug 2013
Posts: 3129

PostPosted: Tue Jan 20, 2015 8:40 pm    Post subject: Reply with quote

There is no need for full reinstall, you can still fix it using emerge from stage3 and any bootable linux. Can be live, or one installed on the other partition.

Mount your root partition under a subdirectory inside stage3 (Say, mnt/gentoo)
chroot into stage3
emerge --config-root=/mnt/gentoo -root=/mnt/gentoo -aev portage

wait for it to complete.... Have a look at what would happen, if it's reasonable, accept, wait and enjoy the fix :]
Back to top
View user's profile Send private message
theo.nicolau
n00b
n00b


Joined: 19 Aug 2004
Posts: 31

PostPosted: Tue Jan 20, 2015 10:20 pm    Post subject: Reply with quote

Thanks all for all your replies but I've decided to reinstall.... I'd say I could use a fresh one after 7years :)

Bye,
Theo
Back to top
View user's profile Send private message
mv
Watchman
Watchman


Joined: 20 Apr 2005
Posts: 6747

PostPosted: Wed Jan 21, 2015 9:21 am    Post subject: Reply with quote

theo.nicolau wrote:
I'd say I could use a fresh one after 7years :)

You will only get an identical system (if you cleanup with e.g. find_cruft from the mv overlay). This is the nice thing about gentoo...
Back to top
View user's profile Send private message
dilfridge
Developer
Developer


Joined: 18 Sep 2010
Posts: 120
Location: Regensburg, Germany

PostPosted: Thu Jan 22, 2015 12:26 am    Post subject: Reply with quote

This should also work when python-exec itself is gone...
Code:
pinacolada ~ # /usr/lib/python-exec/python3.3/emerge -a python-exec

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild   R    ] dev-lang/python-exec-2.0.1-r1:2  PYTHON_TARGETS="(jython2_5) (jython2_7) (pypy) (pypy3) (python2_7) (python3_3) (python3_4)" 0 KiB

Total: 1 package (1 reinstall), Size of downloads: 0 KiB

Would you like to merge these packages? [Yes/No]

(adjust the path to your python version). Sorry if the rather simple solution comes too late now.
Back to top
View user's profile Send private message
khayyam
Watchman
Watchman


Joined: 07 Jun 2012
Posts: 6227
Location: Room 101

PostPosted: Thu Jan 22, 2015 1:23 am    Post subject: Reply with quote

dilfridge wrote:
This should also work when python-exec itself is gone...
Code:
pinacolada ~ # /usr/lib/python-exec/python3.3/emerge -a python-exec

dilfridge ... according to the poster "there is no usr/lib/python-exec/python{2.7,3.3,3.4}" (not sure thats a typo or not) ... I'd asked previously.

best ... khay
Back to top
View user's profile Send private message
gary987
n00b
n00b


Joined: 07 Oct 2006
Posts: 15

PostPosted: Sun Feb 26, 2017 10:40 pm    Post subject: Reply with quote

I did the same stupid thing... I quickpkg it.. but that useless because once you unemerge it... you can't use emerge to put it back.

I did a tar xvjpf python-exec-xxxx -C /

To the best of my knowledge what happen is when you put python-exec back it deletes symbolic lib -> lib64, and recreates lib as a real directory.

So in lib you only now have python-exec which points to nothing. ( Yes i got no supported Python implementation variant found! as well)


So I moved the python-exec files from lib, removed lib, made a symbolic link (lib pointing to lib64) and the put the python-exec files in the proper directory in lib64/ (in my case /usr/lib64/python-exec/ )

So mine looks like this (Getting rid of python3.3 got in this pickle in the first place :( )

elmo2@localhost /usr/lib64/python-exec $

python2.7 python3.2 python3.3 python3.4 python-exec2 python-exec2-c



Then I had to run gcc-config, ldconfig, source /etc/profile, and possibly eselect python (I think that was the first thing).


Hope this works for others,


Cheers,

Gary
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming 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