View previous topic :: View next topic |
Author |
Message |
xeonman9000 n00b
Joined: 06 Aug 2008 Posts: 51 Location: UK
|
Posted: Sat Apr 11, 2009 7:12 pm Post subject: [SOLVED] Stupidly unmerged Python |
|
|
Hi,
I stupidly unmerged Python and therefore emerge no longer works, I've been googling like mad and have tried a couple of solutions, but neither have worked:
http://www.linuxquestions.org/questions/linux-distributions-5/unmerged-python-in-gentoo-system-224430/
https://forums.gentoo.org/viewtopic-t-5746-highlight-unmerged+python.html
In the second link, it says
delta407 wrote: | You might be able to reinstall Python using this:
Code: | # cd
# tar xzf /usr/portage/distfiles/Python-2.2.1.tgz
# cd Python-2.2.1
# ./configure --with-fpectl --infodir=/usr/share/info/ --mandir=/usr/share/man
# make
# make install prefix=/usr
# rm /usr/bin/python 2>/dev/null
# ln -s /usr/bin/python2 /usr/bin/python |
|
This fails at the make install stage:
Code: | ...
Compiling /usr/lib/python2.5/xml/sax/_exceptions.py ...
Compiling /usr/lib/python2.5/xml/sax/expatreader.py ...
Compiling /usr/lib/python2.5/xml/sax/handler.py ...
Compiling /usr/lib/python2.5/xml/sax/saxutils.py ...
Compiling /usr/lib/python2.5/xml/sax/xmlreader.py ...
Compiling /usr/lib/python2.5/xmllib.py ...
Compiling /usr/lib/python2.5/xmlrpclib.py ...
Compiling /usr/lib/python2.5/zipfile.py ...
make: *** [libinstall] Error 1
|
I thought it was about time to ask for some help before I break it any further.
Thanks.
Code: |
lambert Python-2.5.2 # uname -a
Linux lambert 2.6.25-gentoo-r7 #1 SMP Mon Aug 4 01:30:36 BST 2008 x86_64 Intel(R) Core(TM)2 CPU 6400 @ 2.13GHz GenuineIntel GNU/Linux
|
Last edited by xeonman9000 on Sun Apr 19, 2009 5:28 pm; edited 1 time in total |
|
Back to top |
|
|
WalmartSniperLX n00b
Joined: 30 Mar 2007 Posts: 29
|
Posted: Sat Apr 11, 2009 8:43 pm Post subject: |
|
|
Have you tried installing and/or compiling Python from an external source? _________________ Join me in the "Leave no thread unanswered" act. The quest to leave no thread left unanswered. |
|
Back to top |
|
|
ppurka Advocate
Joined: 26 Dec 2004 Posts: 3256
|
|
Back to top |
|
|
xeonman9000 n00b
Joined: 06 Aug 2008 Posts: 51 Location: UK
|
Posted: Sat Apr 11, 2009 11:22 pm Post subject: |
|
|
Sorry for sounding like a complete n00b, but those folders only contain .ebuild files, no tarballs containing the source code. Where can i get these from? |
|
Back to top |
|
|
ppurka Advocate
Joined: 26 Dec 2004 Posts: 3256
|
Posted: Sun Apr 12, 2009 12:09 am Post subject: |
|
|
xeonman9000 wrote: | Sorry for sounding like a complete n00b, but those folders only contain .ebuild files, no tarballs containing the source code. Where can i get these from? | http://tinderbox.dev.gentoo.org/default-linux/x86/dev-lang/
This is for x86. Change to different directory depending on your ARCH.
By the way, these are NOT source codes. These are the ready-to-install binaries. _________________ emerge --quiet redefined | E17 vids: I, II | Now using kde5 | e is unstable :-/ |
|
Back to top |
|
|
bobspencer123 Guru
Joined: 19 Dec 2005 Posts: 544
|
Posted: Thu Apr 16, 2009 12:48 am Post subject: |
|
|
xeonman9000 wrote: | Sorry for sounding like a complete n00b, but those folders only contain .ebuild files, no tarballs containing the source code. Where can i get these from? |
I think you can just download this python if you are using the x86 arch and then move it to /
then as root
where foo is the package name.
Hope this works for ya. |
|
Back to top |
|
|
pigeon768 l33t
Joined: 02 Jan 2006 Posts: 683
|
Posted: Thu Apr 16, 2009 7:19 am Post subject: |
|
|
If it were me: Code: | tar -xvaf /usr/portage/distfiles/python-2.most.recent.version.tar.gz
cd python-most.recent
./configure
make
make install
emerge -1 python
make uninstall
emerge -1 python | No matter what you do, make sure that when you're done you delete the files you create - having cruft associated with a compiler can be problematic. |
|
Back to top |
|
|
xeonman9000 n00b
Joined: 06 Aug 2008 Posts: 51 Location: UK
|
Posted: Sun Apr 19, 2009 5:27 pm Post subject: |
|
|
bobspencer123 wrote: | xeonman9000 wrote: | Sorry for sounding like a complete n00b, but those folders only contain .ebuild files, no tarballs containing the source code. Where can i get these from? |
I think you can just download this python if you are using the x86 arch and then move it to /
then as root
where foo is the package name.
Hope this works for ya. |
Thanks a lot, that worked a treat. All I had to do after the extraction was make a symbolic link from /usr/bin/python to /usr/bin/python2.5.
pigeon768 wrote: | If it were me: Code: | tar -xvaf /usr/portage/distfiles/python-2.most.recent.version.tar.gz
cd python-most.recent
./configure
make
make install
emerge -1 python
make uninstall
emerge -1 python | No matter what you do, make sure that when you're done you delete the files you create - having cruft associated with a compiler can be problematic. |
Thanks for the suggestion. Unfortunately I recently ran an eclean and no longer had the sources. |
|
Back to top |
|
|
randalla Tux's lil' helper
Joined: 14 Oct 2008 Posts: 79 Location: Seattle, WA
|
Posted: Fri Apr 24, 2009 6:19 pm Post subject: |
|
|
pigeon768 wrote: | If it were me: Code: | tar -xvaf /usr/portage/distfiles/python-2.most.recent.version.tar.gz
cd python-most.recent
./configure
make
make install
emerge -1 python
make uninstall
emerge -1 python | No matter what you do, make sure that when you're done you delete the files you create - having cruft associated with a compiler can be problematic. |
In some unfortunate irony, I mistakenly removed python as well (trying to fix a broken build in the evening). I followed what you recommended and it worked quite well. I did have to some extra steps, however:
1) The Python source archive, which has a capital P, is a bzip2, not gzip, tar archive.
2) Emerge did not work initially as python was installed into the /usr/local directory. I had to create a symlink in /usr/bin to the newly installed python in /usr/local/bin
3) I did not use the -1 as I do want it added to the world tree
4) There is no make uninstall for Python it seems, I had to remove the files in /usr/local by hand.
At the end I did follow the emerge instructions and ran /usr/sbin/python-updater, though I don't know if that was necessary.
Adam. |
|
Back to top |
|
|
timeBandit Bodhisattva
Joined: 31 Dec 2004 Posts: 2719 Location: here, there or in transit
|
Posted: Fri Apr 24, 2009 7:53 pm Post subject: |
|
|
Moved from Portage & Programming to Duplicate Threads.
See this post for the most efficient solution to this common problem. _________________ Plants are pithy, brooks tend to babble--I'm content to lie between them.
Super-short f.g.o checklist: Search first, strip comments, mark solved, help others. |
|
Back to top |
|
|
|