Error uninstalling python27

Hi

I am trying to uninstall python27 to solve the exact error encountered in this post and run into a very similar error to the one he encountered while trying to uninstall phyton27, namely
Code:
===>   Deinstalling python27-2.7.5_1
pkg_delete: unable to completely remove directory '/usr/local/lib/python2.7/site-packages'
pkg_delete: unable to completely remove directory '/usr/local/lib/python2.7'
pkg_delete: couldn't entirely delete package `python27-2.7.5_1'
(perhaps the packing list is incorrectly specified?)
with the addition of
Code:
pkg_delete: unable to completely remove directory '/usr/local/include/python2.7'
which is basically the same but contains no reference to libyam1 or any other port that may be causing this issue.

Is it possible to force removal without wrecking the system, or is there another solution?
 
Ah that would explain why after manually removing the directories I don't get those errors, thank you for that.

I am however still getting the following error when trying to install gobject-introspection:

Code:
Software# make install clean
===>  Building for gobject-introspection-1.34.2
gmake  all-recursive
gmake[1]: Entering directory `/usr/ports/devel/gobject-introspection/work/gobject-introspection-1.34.2'
Making all in .
gmake[2]: Entering directory `/usr/ports/devel/gobject-introspection/work/gobject-introspection-1.34.2'
  CC     _giscanner_la-giscannermodule.lo
In file included from /usr/local/include/glib-2.0/glib/deprecated/gthread.h:124,
                 from /usr/local/include/glib-2.0/glib.h:108,
                 from giscanner/sourcescanner.h:26,
                 from giscanner/giscannermodule.c:26:
/usr/local/include/pth/pthread.h:285: error: conflicting types for 'pthread_t'
/usr/include/sys/_pthreadtypes.h:65: error: previous declaration of 'pthread_t' was here
/usr/local/include/pth/pthread.h:286: error: conflicting types for 'pthread_attr_t'
/usr/include/sys/_pthreadtypes.h:68: error: previous declaration of 'pthread_attr_t' was here
/usr/local/include/pth/pthread.h:288: error: conflicting types for 'pthread_once_t'
/usr/include/sys/_pthreadtypes.h:74: error: previous declaration of 'pthread_once_t' was here
/usr/local/include/pth/pthread.h:289: error: conflicting types for 'pthread_mutexattr_t'
/usr/include/sys/_pthreadtypes.h:70: error: previous declaration of 'pthread_mutexattr_t' was here
/usr/local/include/pth/pthread.h:290: error: conflicting types for 'pthread_mutex_t'
/usr/include/sys/_pthreadtypes.h:69: error: previous declaration of 'pthread_mutex_t' was here
/usr/local/include/pth/pthread.h:291: error: conflicting types for 'pthread_condattr_t'
/usr/include/sys/_pthreadtypes.h:72: error: previous declaration of 'pthread_condattr_t' was here
/usr/local/include/pth/pthread.h:292: error: conflicting types for 'pthread_cond_t'
/usr/include/sys/_pthreadtypes.h:71: error: previous declaration of 'pthread_cond_t' was here
/usr/local/include/pth/pthread.h:293: error: conflicting types for 'pthread_rwlockattr_t'
/usr/include/sys/_pthreadtypes.h:76: error: previous declaration of 'pthread_rwlockattr_t' was here
/usr/local/include/pth/pthread.h:294: error: conflicting types for 'pthread_rwlock_t'
/usr/include/sys/_pthreadtypes.h:75: error: previous declaration of 'pthread_rwlock_t' was here
/usr/local/include/pth/pthread.h:357: error: conflicting types for 'pthread_kill'
/usr/include/signal.h:75: error: previous declaration of 'pthread_kill' was here
gmake[2]: *** [_giscanner_la-giscannermodule.lo] Error 1
gmake[2]: Leaving directory `/usr/ports/devel/gobject-introspection/work/gobject-introspection-1.34.2'
gmake[1]: *** [all-recursive] Error 1
gmake[1]: Leaving directory `/usr/ports/devel/gobject-introspection/work/gobject-introspection-1.34.2'
gmake: *** [all] Error 2
*** Error code 1

Stop in /usr/ports/devel/gobject-introspection.

Any help would be much appreciated.
 
Hi!

This can happen because of different things. For starters, let's rule out some more common errors, or at least fix them, if they are indeed the reason.

  1. If you're running FreeBSD 10-CURRENT you may be out of luck. Tell us which FreeBSD version you're using.
  2. Show your /etc/make.conf, if you did some configuration there.
  3. Make sure your ports tree is up to date (you can bring it up to date with # portsnap fetch update).
  4. Upgrade your ports as well, check /usr/ports/UPDATING before upgrading any of them, this file may warn you if any of the ports' upgrade requires special treatment. To see which ports require upgrading, you can use # pkg_version -v | grep -v =, or, if you use PKGNG, # pkg version -v | grep -v =. If you don't know what PKGNG is, don't install it, just use the first command.
  5. If you used ports-mgmt/portmaster or ports-mgmt/portupgrade to do the upgrade of your ports, you're in for a treat, since my next suggestion is to (re)build the port along with all dependencies. Try # portmaster -Rf /usr/ports/devel/gobject-introspection, or (if you use portupgrade) # portupgrade -RNcf devel/gobject-instrospection.
For the portupgrade command I'm not so sure, and I suspect it will try just to install missing dependencies, so go with portmaster on this one.

I hope some of these suggestions will be helpful. If not, tell us what's still wrong. ;)
 
Careful, the portupgrade and portmaster options are not all the same. -R and -r both mean different things to both programs.

But the error in post #3--isn't that the old "must rebuild Python with the threads option the opposite of what it is now" problem?
 
You're right; and I'm not very experienced in portmaster, but won't this command do the same thing in this case? I checked the portmaster(8)() page, and maybe I didn't understand it correctly.
 
In portupgrade, -R means "every port that this one depends on".

portmaster does not do that. It checks that the ports the current one depends on are the latest versions, but there's no way to force it to rebuild them. -R is an option to skip rebuilding ports that have already been rebuilt.

I think the portmaster command in post #4 will just rebuild devel/gobject-introspection and, by default, anything that depends on it that portmaster thinks needs to be rebuilt.

The portupgrade command will force a rebuild of everything that devel/gobject-introspection depends on, and then rebuild devel/gobject-introspection itself.
 
I'm pretty sure portmaster -f rebuilds a port and the ports it depends on, whether they're up to date or not. Without the -f, portmaster will (indeed) just rebuild the port.
 
wblock@ said:
Careful, the portupgrade and portmaster options are not all the same. -R and -r both mean different things to both programs.

But the error in post #3--isn't that the old "must rebuild Python with the threads option the opposite of what it is now" problem?

Having hit that bump in the road recently (as in the last 12 hours), I suspect your observation is correct.

Driftwood, try rebuilding Python without GNU threads (pth) in the configuration dialog, then building gobject-introspection.
 
Back
Top