Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
I unmerged python... ensuing problems....
View unanswered posts
View posts from last 24 hours

Goto page Previous  1, 2, 3  Next  
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message
acoul
n00b
n00b


Joined: 19 Jan 2005
Posts: 29

PostPosted: Sat Sep 22, 2007 3:08 am    Post subject: Reply with quote

if you install the binary and you still have problems compiling, then one thing you should look are the values of the make.conf that should be set correctly.

Edit: in my case the problem was a wrong LANGUAGE setting. The wrong setting is the one with the comment bellow:
Code:

#LINGUAS="en_US el_GR"
LINGUAS="en el"

this script might also help.


Last edited by acoul on Tue Dec 04, 2007 7:43 am; edited 2 times in total
Back to top
View user's profile Send private message
BServiss
n00b
n00b


Joined: 24 Nov 2002
Posts: 62

PostPosted: Sat Sep 22, 2007 8:32 pm    Post subject: Reply with quote

Another issue that I stumbled upon was a java breakage. Java-config stopped after missing an import - outputformatter which was not rebuilt with all the other fun I was having with python.

The instructions here fixed that problem.
Back to top
View user's profile Send private message
sab
n00b
n00b


Joined: 20 Feb 2007
Posts: 12
Location: London

PostPosted: Fri Oct 05, 2007 8:02 pm    Post subject: Reply with quote

I love u all....Gentoo rocks.
Had the same problem and now solved.
_________________
" Have you ever noticed that at trade shows Microsoft is always the one giving
away stress balls?"
Back to top
View user's profile Send private message
kelargo
n00b
n00b


Joined: 03 Jul 2004
Posts: 51

PostPosted: Thu Oct 18, 2007 2:40 am    Post subject: thanks delta407 ! Reply with quote

your instructions on bandaging python back to life for emerge to work properly helped me out!
Back to top
View user's profile Send private message
panyo
Tux's lil' helper
Tux's lil' helper


Joined: 02 Jan 2004
Posts: 86

PostPosted: Thu Nov 29, 2007 10:36 am    Post subject: Reply with quote

Perhaps the right answer to this would be helpful at the start of the thread, as in this thread:
https://forums.gentoo.org/viewtopic-t-443022-highlight-pam+blocking+shadow.html

And both perhaps should be reflected in the GCC upgrade guide, which may be what brought
many of us here? I am currently working on my first full system upgrade on my powerbook
because I finally had to upgrade to modular X, which I knew would break my system- and it did.
Now, preparing to emerging world to fix X, I am doing this upgrade, which I knew would break
my system--and it did. This is how it was long ago, and I have been reluctant to do full system
upgrades since. But now the answers are all pretty neat and easy, and seem would not be bad
to add to the pitfalls sections of the upgrade guides.
Back to top
View user's profile Send private message
trossachs
Veteran
Veteran


Joined: 22 Jan 2004
Posts: 1204
Location: London

PostPosted: Mon Dec 03, 2007 3:03 am    Post subject: Reply with quote

Thanks so VERY MUCH delta407, it worked for me! :D
Back to top
View user's profile Send private message
zoltix
Apprentice
Apprentice


Joined: 22 Mar 2004
Posts: 249
Location: Brusssels

PostPosted: Sun Dec 30, 2007 12:00 am    Post subject: Reply with quote

Sorry but I have litle issue could please help me ?
[code]
bash: /usr/bin/emerge: /usr/bin/python: bad interpreter: Permission denied

[\code]
Back to top
View user's profile Send private message
desultory
Bodhisattva
Bodhisattva


Joined: 04 Nov 2005
Posts: 9410

PostPosted: Sun Dec 30, 2007 12:22 pm    Post subject: Reply with quote

If the python interpreter is actually nonfunctional, as opposed to some mishap with configuration or selection, try the following.

Download the package from the tinderbox repository which matches the architecture of the system. Place that file in $PKGDIR on that system. Then unpack that package directly under /, tar xvjf $PKGDIR/python-2.4.4-r6.tbz2 should do it, though $PKGDIR will likely need to be manually expanded as it is not typically present in the environment. Next ln -s /usr/bin/python2.4 /usr/bin/python. Finally, emerge -K dev-lang/python.
Back to top
View user's profile Send private message
zoltix
Apprentice
Apprentice


Joined: 22 Mar 2004
Posts: 249
Location: Brusssels

PostPosted: Sun Dec 30, 2007 12:44 pm    Post subject: Reply with quote

perfect thank a lot ..........;
Back to top
View user's profile Send private message
Wyatt
n00b
n00b


Joined: 02 Mar 2007
Posts: 15
Location: Columbus,OH,USA

PostPosted: Wed Jan 02, 2008 3:08 pm    Post subject: Reply with quote

Idiot here, uninstalled python to resolve a blocking issue (sigh). I've gotten a python copy running but portage is giving me garbage about pysqlite (like so):
Code:
====================================
Error: Failed to import module 'cache.sqlite.database'

  File "/usr/lib/portage/pym/portage.py", line 1654, in load_best_module
    mod = load_mod(best_mod)
  File "/usr/lib/portage/pym/portage.py", line 156, in load_mod
    mod = __import__(modname)
  File "/usr/lib/portage/pym/cache/sqlite.py", line 14, in ?
    from pysqlite2 import dbapi2 as db_module
No module named pysqlite2
====================================


So I installed it on my laptop and copied it over, and the message changed but the end result didn't:

Code:
====================================
Error: Failed to import module 'cache.sqlite.database'

  File "/usr/lib/portage/pym/portage.py", line 1654, in load_best_module
    mod = load_mod(best_mod)
  File "/usr/lib/portage/pym/portage.py", line 156, in load_mod
    mod = __import__(modname)
  File "/usr/lib/portage/pym/cache/sqlite.py", line 14, in ?
    from pysqlite2 import dbapi2 as db_module
  File "/usr/lib/python2.4/site-packages/pysqlite2/dbapi2.py", line 27, in ?
    from pysqlite2._sqlite import *
/usr/lib/python2.4/site-packages/pysqlite2/_sqlite.so: undefined symbol: sqlite3_enable_shared_cache
====================================


So what would be the best idea in this case? The portage package from tinderbox and the latest snapshot? I'm trying to avoid breaking things any more than I already have, so I thought I'd ask for advice (please) before I do anything more.
Back to top
View user's profile Send private message
Tmor
n00b
n00b


Joined: 10 Mar 2005
Posts: 30

PostPosted: Thu Jan 03, 2008 8:29 pm    Post subject: Reply with quote

Code:
# cd
# tar xzf /usr/portage/distfiles/Python-2.4.2.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.4 /usr/bin/python2
# ln -s /usr/bin/python2 /usr/bin/python


Another successful fix of Python.

There should be a "special" USE FLAG for Python to not let you unmerge it. I to, thought, oh, unmerge the blocking issue and remerge. Fortunately it only took about 2 hours to find the solution.
_________________
A day without sunshine is like night...
Back to top
View user's profile Send private message
desultory
Bodhisattva
Bodhisattva


Joined: 04 Nov 2005
Posts: 9410

PostPosted: Fri Jan 04, 2008 9:33 am    Post subject: Reply with quote

Wyatt wrote:
So what would be the best idea in this case? The portage package from tinderbox and the latest snapshot?
Barring a local archive of compiled packages (which could be used in the same fashion), that should be (at least close to) the fastest and easiest way to fix it.
Back to top
View user's profile Send private message
Lord_DragonFly
n00b
n00b


Joined: 28 Jan 2008
Posts: 21
Location: Portland, Maine, USA

PostPosted: Thu Jan 31, 2008 4:49 am    Post subject: Reply with quote

@Tmor: i believe there is something like this already.

Portage is part of the system profile, which means that portage will complain if you ask to remove it but (since you are root and therefore god) will let you unmerge it anyway.

Running `emerge -aC` or `emerge -pC` are recommended.

Code:
dragonfly@Hikari ~ $ emerge -pC python

>>> These are the packages that would be unmerged:


!!! 'dev-lang/python' is part of your system profile.
!!! Unmerging it may be damaging to your system.


 dev-lang/python
    selected: 2.5.1-r5
   protected: none
     omitted: none

>>> 'Selected' packages are slated for removal.
>>> 'Protected' and 'omitted' packages will not be removed.



[edit] fixed typo
Back to top
View user's profile Send private message
desultory
Bodhisattva
Bodhisattva


Joined: 04 Nov 2005
Posts: 9410

PostPosted: Thu Jan 31, 2008 7:17 am    Post subject: Reply with quote

Lord_DragonFly wrote:
Running `emerge -aC` or `emerge -pC` are recommended.
It is safer to use -c (--clean) or -P (--prune) instead of -C (--unmerge), as unlike -C they would not remove all versions. In addition -C does not take dependencies into account, while -P and --depclean do, though --depclean should also be used with -p (--pretend) or -a (--ask).
Back to top
View user's profile Send private message
vectox
n00b
n00b


Joined: 29 Oct 2004
Posts: 21
Location: Luxembourg

PostPosted: Wed Feb 20, 2008 12:40 am    Post subject: Great reference. Reply with quote

desultory wrote:
If the python interpreter is actually nonfunctional, as opposed to some mishap with configuration or selection, try the following.

Download the package from the tinderbox repository which matches the architecture of the system. Place that file in $PKGDIR on that system. Then unpack that package directly under /, tar xvjf $PKGDIR/python-2.4.4-r6.tbz2 should do it, though $PKGDIR will likely need to be manually expanded as it is not typically present in the environment. Next ln -s /usr/bin/python2.4 /usr/bin/python. Finally, emerge -K dev-lang/python.


Ahhh...this one saved the day...the manual compiles reminded me of the good ol Slackware days....and the errors/dependancies that ensued.
Back to top
View user's profile Send private message
mmoufid
n00b
n00b


Joined: 21 Aug 2007
Posts: 22
Location: Ottawa ON

PostPosted: Thu Feb 28, 2008 11:35 pm    Post subject: Reply with quote

I did this when I first started using Gentoo. :oops: Perhaps Portage should warn when a user attempts to --unmerge Python? :wink:
Back to top
View user's profile Send private message
mslinn
Apprentice
Apprentice


Joined: 24 Sep 2004
Posts: 206
Location: Half Moon Bay, CA

PostPosted: Fri Apr 25, 2008 3:10 am    Post subject: Oops ... Reply with quote

Here is how I recovered Python v2.5. Instructions have changed slightly from the original posting:
Code:
cd
bzip2 -d< /usr/portage/distfiles/Python-2.5.2.tar.bz2 |tar -xf -
cd Python-2.5.2
sudo ./configure --with-fpectl --infodir=/usr/share/info/ --mandir=/usr/share/man
sudo make
sudo make install prefix=/usr
sudo emerge =dev-lang/python-2.5.2-r1
sudo python-updater
Back to top
View user's profile Send private message
cfgauss
l33t
l33t


Joined: 18 May 2005
Posts: 688
Location: USA

PostPosted: Sat Jul 19, 2008 3:23 pm    Post subject: Reply with quote

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


Hopefully this will be enough of Python to let you "emerge python" again.


This worked for me with small changes for a newer Python version and a .bz2 rather than .tgz file.

This post should be enshrined somewhere as a FAQ. Also the list of what never to unemerge should be right along side it. (I once unemerged coreutils as well!)
Back to top
View user's profile Send private message
Phylroy
n00b
n00b


Joined: 23 Mar 2004
Posts: 18

PostPosted: Tue Jul 22, 2008 1:17 am    Post subject: Unmerged python.. now emerge doesn't work.. Reply with quote

Shot myself in the foot.. Python was blocking the new python packages...

[blocks B ] <dev-lang/python-2.3.6-r2 (is blocking app-admin/python-updater-0.5, app-admin/python-updater-0.2)


So I did what I usually do in this situation...emerge -C the offending package and then remerge it..

However I forgot that emergey depends on python....crap...Now I have a chicken or the egg problem...

Any solutions for this?
Back to top
View user's profile Send private message
desultory
Bodhisattva
Bodhisattva


Joined: 04 Nov 2005
Posts: 9410

PostPosted: Tue Jul 22, 2008 2:16 am    Post subject: Reply with quote

There known solutions, some faster than others.

Merged the above post.
Back to top
View user's profile Send private message
lanjelot
n00b
n00b


Joined: 10 May 2007
Posts: 3

PostPosted: Sun Jul 27, 2008 6:58 am    Post subject: Reply with quote

The only solution that worked for me was
http://gentoo-wiki.com/HOWTO_Restoring_Removed_Key_System_Packages

But i had unmerged both sys-libs/db and dev-lang/python, and all slots of them!
Back to top
View user's profile Send private message
hansmaa
n00b
n00b


Joined: 11 Feb 2005
Posts: 69

PostPosted: Sun Aug 03, 2008 2:15 am    Post subject: Reply with quote

desultory wrote:
If the python interpreter is actually nonfunctional, as opposed to some mishap with configuration or selection, try the following.

Download the package from the tinderbox repository which matches the architecture of the system. Place that file in $PKGDIR on that system. Then unpack that package directly under /, tar xvjf $PKGDIR/python-2.4.4-r6.tbz2 should do it, though $PKGDIR will likely need to be manually expanded as it is not typically present in the environment. Next ln -s /usr/bin/python2.4 /usr/bin/python. Finally, emerge -K dev-lang/python.


Thanks.

This worked. Was quite sure I'd broken my server when I found this thread :)
Back to top
View user's profile Send private message
tommytumult
n00b
n00b


Joined: 24 Aug 2005
Posts: 11

PostPosted: Fri Aug 15, 2008 2:38 pm    Post subject: Reply with quote

desultory wrote:
If the python interpreter is actually nonfunctional, as opposed to some mishap with configuration or selection, try the following.

Download the package from the tinderbox repository which matches the architecture of the system. Place that file in $PKGDIR on that system. Then unpack that package directly under /, tar xvjf $PKGDIR/python-2.4.4-r6.tbz2 should do it, though $PKGDIR will likely need to be manually expanded as it is not typically present in the environment. Next ln -s /usr/bin/python2.4 /usr/bin/python. Finally, emerge -K dev-lang/python.


You, sir, are a lifesaver. I know better than to emerge -C python, something in me said "Don't do it. Search the forums on the blocker" but I did it anyway and thought I was dead where I stood after it completed. Thank you.
Back to top
View user's profile Send private message
monsm
Guru
Guru


Joined: 26 Sep 2007
Posts: 467
Location: London, UK

PostPosted: Fri Aug 15, 2008 3:41 pm    Post subject: Reply with quote

tommytumult wrote:
desultory wrote:
If the python interpreter is actually nonfunctional, as opposed to some mishap with configuration or selection, try the following.

Download the package from the tinderbox repository which matches the architecture of the system. Place that file in $PKGDIR on that system. Then unpack that package directly under /, tar xvjf $PKGDIR/python-2.4.4-r6.tbz2 should do it, though $PKGDIR will likely need to be manually expanded as it is not typically present in the environment. Next ln -s /usr/bin/python2.4 /usr/bin/python. Finally, emerge -K dev-lang/python.


You, sir, are a lifesaver. I know better than to emerge -C python, something in me said "Don't do it. Search the forums on the blocker" but I did it anyway and thought I was dead where I stood after it completed. Thank you.


:D Good its not just me doing these clever things...

This tinderbox version of recovering seem better than what I did. I found the old Python package in the distfiles directory and then unpacked and run .configure, make and make install myself. Then I run emerge python and got a second copy of the same version of Python 2.5 on my system. I couldn't get Compiz-Fusion to run again with fusion-icon. To recover from this new problem, I then emerged Python 2.4 (emerge python-2.4* or something like that). After having 2.4 I then unmerged 2.5 and deleted everything I could find from the other 2.5 version I had installed manually. After that it all worked again after re-emegring pygtk and fusion-icon. Puh! I am still too scared to emerge the new Python 2.5 (I have masked it in package.mask).

Mons
Back to top
View user's profile Send private message
devsk
Advocate
Advocate


Joined: 24 Oct 2003
Posts: 2995
Location: Bay Area, CA

PostPosted: Wed Aug 27, 2008 8:25 pm    Post subject: Reply with quote

I wonder why portage just doesn't let you unmerge python and itself from the command line? That would sound like a fair plan in this case and help end-users. A program should not allow the users to shoot themselves in the foot. When we release products at our company, we tend to account for all users irrespective of their intelligence level and make sure that the end users don't shoot themselves in the foot in any way. In this case, its seems rather obvious. Is it really hard to just not allow unmerging of python and portage from command line? How about an extra warning with explicit text (different from "this is part of your system profile" crap) stating that this will be the end of your gentoo dreams and you won't be able to install anything, not even portage itself?
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks All times are GMT
Goto page Previous  1, 2, 3  Next
Page 2 of 3

 
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