DaemonForums  

Go Back   DaemonForums > NetBSD > NetBSD Package System (pkgsrc)

NetBSD Package System (pkgsrc) Installation and upgrading of packages on NetBSD.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 21st June 2012
velikij velikij is offline
New User
 
Join Date: Jun 2012
Posts: 7
Thanked 0 Times in 0 Posts
Unhappy Failure to finish installing PHP for LAMP

When I try to build and install PHP when trying to install LAMP (according to how_to_install_a_lamp_server on the netbsd wiki), I get the following failure message:

===> Install binary package of libxml2-2.8.0nb2
pkg_add: A different version of libxml2-2.8.0nb2 is already installed: libxml2-2.7.8nb10
pkg_add: 1 package addition failed
*** Error code 1

I can't delete the old libxml2 since it is required by various other installed packages such as openbox, various xfce4 packages, etc.

Some system info:

System running on bsd.xxx:
NetBSD 5.1.2 i386
NetBSD 5.1.2 (GENERIC) #0: Thu Feb 2 17:22:10 UTC 2012 builds@b6.netbsd.org:/home/builds/ab/netbsd-5-1-2-RELEASE/i386/201202021012Z-obj/home/builds/ab/netbsd-5-1-2-RELEASE/src/sys/arch/i386/compile/GENERIC
model name : Intel(R) Celeron(R) CPU 1.70GHz
MemTotal: 2016380 kB
MemFree: 1585288 kB

My pkgsrc-supfile looks like
*default tag=.
*default release=cvs
*default delete use-rel-suffix
*default umask=002
*default host=cvsup.us.netbsd.org
*default base=/home/peter

netbsd-pkgsrc

My .xinitrc file is set to run openbox right now, though I have xfce4 installed.

Are my pkgscrc sources out of sync with packages that I formerly installed as binaries, such as the whole X system, openbox, xfce4, etc?

- Peter
Reply With Quote
  #2   (View Single Post)  
Old 22nd June 2012
ocicat ocicat is offline
Administrator
 
Join Date: Apr 2008
Posts: 2,831
Thanked 190 Times in 160 Posts
Default

Quote:
Originally Posted by velikij View Post
I get the following failure message:
Code:
===> Install binary package of libxml2-2.8.0nb2
pkg_add: A different version of libxml2-2.8.0nb2 is already installed: libxml2-2.7.8nb10
pkg_add: 1 package addition failed
*** Error code 1
I can't delete the old libxml2 since it is required by various other installed packages such as openbox, various xfce4 packages, etc.
Yes, it appears there is either a pkgsrc version mismatch, or the dependencies of some ports have not been synchronized. I do not have enough knowledge of pkgsrc to answer this question further with specifics, however posting on the pkgsrc-users@ mailing list will target the audience that can give you a concise answer. Information on subscribing can be found at the following:

http://netbsd.org/mailinglists/#pkgsrc-users
Reply With Quote
  #3   (View Single Post)  
Old 22nd June 2012
velikij velikij is offline
New User
 
Join Date: Jun 2012
Posts: 7
Thanked 0 Times in 0 Posts
Default

Thank you - I'll check the netbsd forum link!
Reply With Quote
  #4   (View Single Post)  
Old 22nd June 2012
velikij velikij is offline
New User
 
Join Date: Jun 2012
Posts: 7
Thanked 0 Times in 0 Posts
Default

Having subscribed now, I see no instructions on how to post to that list.
Reply With Quote
  #5   (View Single Post)  
Old 22nd June 2012
ocicat ocicat is offline
Administrator
 
Join Date: Apr 2008
Posts: 2,831
Thanked 190 Times in 160 Posts
Default

Quote:
Originally Posted by velikij View Post
Having subscribed now, I see no instructions on how to post to that list.
If you have received notification that subscription has been completed, simply send an email message to pkgsrc-users@. Within minutes, you should see it appear on any of the archive sites which archive pkgsrc-users@ although verifying that the message reaches an archive site is not mandatory.

The point here is that mailing lists are simple. You know the address of the list, you have successfully subscribed, so now you can post messages, & you can continue to post messages until:
  • you either unsubscribe
  • the mailing list administrators terminate the list or forget to pay the electric bill
  • or for whatever reason, they unsubscribe your address.
Note that I am not specifying the domain in this message. This is intentional, as spammers can scrape Web pages harvesting email addresses for their nefarious exploits. Obviously when you send email to pkgsrc-users@, you will need to provide the domain name too.
Reply With Quote
  #6   (View Single Post)  
Old 23rd June 2012
velikij velikij is offline
New User
 
Join Date: Jun 2012
Posts: 7
Thanked 0 Times in 0 Posts
Default

Thank youi. I'll do that!
Reply With Quote
  #7   (View Single Post)  
Old 7th March 2013
DaBSD DaBSD is offline
Port Guard
 
Join Date: Jan 2013
Posts: 40
Thanked 0 Times in 0 Posts
Default

So what did you find out, Velikij?

I've encountered a similar problem. I'm using NetBSD 6.0.1 GENERIC i386. Yesterday I installed Emacs, first as a binary package via pkgin. But whenever I run it, there came segmentation fault. I deleted Emacs and decided to compile it via pkgsrc. This time it was interrupted by the disagreement between 2 versions of the same dependency:

Quote:
===> Install binary package of glib2-2.34.3
pkg_add: A different version of glib2-2.34.3 is already installed: glib2-2.32.4nb1
pkg_add: 1 package addition failed
*** Error code 1

Stop.
make: stopped in /usr/pkgsrc/devel/glib2
*** Error code 1
I looked into the possibility of deinstalling glib2, but there's 75 other packages bound with it, incl. Gnome I'm being on, so this is obviously not an option.

What can be done here, is there any option to add to pkgsrc in order to make it overwrite older versions of files?
Reply With Quote
  #8   (View Single Post)  
Old 10th March 2013
classicmanpro's Avatar
classicmanpro classicmanpro is offline
Real Name: Turea Alexandru Teodor
Fdisk Soldier
 
Join Date: Oct 2010
Location: Romania (SE Europe)
Posts: 49
Thanked 1 Time in 1 Post
Lightbulb

I've encountered this issue during system-wide updates and found out that there are two branches of PHP available, thus I had to manually specify which package needs to be updated.

Also, when I encountered version conflicts, I found out that the best way to deal with them is by dropping out of X, into the good old terminal and run:

Code:
/usr/pkg/sbin/pkg_add -uu MyPackage
Last but not least, take a look at PKGDEPGRAPH(1).

Supposing you have PHP installed, here is a PHP script which creates a "raw" update script needed for a fail-safe system-wide update. It prepares an update which starts from the core dependencies (the most depended upon, like PERL) and works its way out to the leafs (those without dependencies, like TCSH).

After it generates the update sequence, YOU NEED TO REVIEW IT "LINE BY LINE" ... REMEMBER ... ALWAYS DOUBLE CHECK. Here is the script:

PHP Code:
#!/usr/bin/env php
<?php

/* *** PKGDEPGRAPH(1) *** */

ob_start();
$sysValue system'pkgdepgraph -o' $sysCode );
$strList ob_get_contents();
ob_end_clean();

if ( 
$sysValue === FALSE || $sysCode ) { exit; }

/* *** TMP Directory *** */

$tmp '/var/tmp/' time();

$sysValue system"mkdirhier {$tmp}$sysCode );
if ( 
$sysValue === FALSE || $sysCode ) { exit; }

/* *** LIST Processing *** */

$arrList explode"\n" $strList );

$dbList = array();

foreach ( 
$arrList as $key => $value ) {
    if ( !empty( 
$value ) && preg_match'/label="\((\d+)\)\s(.+)"/' $value $matches ) ) {
        
$order   $matches[1];
        
$package $matches[2];
        if ( !
array_key_exists$order $dbList ) ) { $dbList[$order] = array(); }
        
$dbList[$order][] = $package;
    }
}

@
file_put_contents"{$tmp}/packages.lst" $strList );
@
file_put_contents"{$tmp}/array.1.lst"  print_r$dbList TRUE ) );

krsort$dbList );

@
file_put_contents"{$tmp}/array.2.lst"  print_r$dbList TRUE ) );

$sequence "#!/bin/sh\n";

foreach ( 
$dbList as $arrLevel ) {
    foreach ( 
$arrLevel as $package ) {
        
$sequence .= "/usr/pkg/sbin/pkg_add -uu {$package}\n";
    }
}

@
file_put_contents"{$tmp}/sequence.sh" $sequence );
system"chmod 0755 {$tmp}/sequence.sh" );

?>
__________________
A daemon in need is a daemon indeed.

Last edited by classicmanpro; 10th March 2013 at 11:22 AM. Reason: Grammar.
Reply With Quote
  #9   (View Single Post)  
Old 11th March 2013
DaBSD DaBSD is offline
Port Guard
 
Join Date: Jan 2013
Posts: 40
Thanked 0 Times in 0 Posts
Default

Thanks, classicmanpro, but what is the difference between your script and "pkgin full-upgrade"?

Having said that, "pkgin full-upgrade" didn't help me in any way, as it said all installed packages were up to date (as glib2's latest version was available only from sources).
Reply With Quote
Old 11th March 2013
classicmanpro's Avatar
classicmanpro classicmanpro is offline
Real Name: Turea Alexandru Teodor
Fdisk Soldier
 
Join Date: Oct 2010
Location: Romania (SE Europe)
Posts: 49
Thanked 1 Time in 1 Post
Lightbulb

When I run the upgrade sequence, I redirect the output to a temporary file and study that output carefully to spot potential problems.

Also, one other thing that I noticed was that, when doing major upgrades to binary packages, it's best to do it in stages because, from time to time, the ftp download hangs. It appears to be something about file descriptors or something similar.

PS: I also have glib2 installed, as a binary package. Maybe you should make a shell script which installs some/missing dependencies by changing PKG_PATH dynamically.
__________________
A daemon in need is a daemon indeed.

Last edited by classicmanpro; 11th March 2013 at 08:02 PM. Reason: Grammar.
Reply With Quote
Old 11th March 2013
DaBSD DaBSD is offline
Port Guard
 
Join Date: Jan 2013
Posts: 40
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by classicmanpro View Post
Also, one other thing that I noticed was that, when doing major upgrades to binary packages, it's best to do it in stages because, from time to time, the ftp download hangs.
As far as I can remember, it used to be a plague for NetBSD when I was messing with it some 5-6 years ago, when a broken connection could destroy the fetching of dependencies. Now I'm happy to see that pkgin re-launchs a download in case it didn't finish correctly.
Reply With Quote
Reply

Tags
lamp, php, pkgsrc

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
The Failure of the GPL vermaden Off-Topic 9 6th September 2009 05:11 PM
Make world failure disappearedng FreeBSD General 1 16th January 2009 12:04 PM
A failure in password security TerryP Off-Topic 3 25th September 2008 03:19 AM
Libpurple 2.4.2 config failure. KernelPanic FreeBSD Ports and Packages 3 23rd May 2008 06:19 PM
BitchX build failure mahoney FreeBSD Ports and Packages 1 8th May 2008 07:48 AM


All times are GMT. The time now is 07:48 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick