DaemonForums  

Go Back   DaemonForums > OpenBSD > OpenBSD Packages and Ports

OpenBSD Packages and Ports Installation and upgrading of packages and ports on OpenBSD.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 8th May 2008
DrKrall DrKrall is offline
New User
 
Join Date: May 2008
Location: Luleå - Sweden
Posts: 9
Question Problem installing PHP5

I've been migrating to OpenBSD from FreeBSD and have some problems installing PHP5. I got Apache installed (the version that came with OpenBSD 4.3 release base install) and when i'm trying to install PHP5 i get following error(s).

Code:
# make configure
===> www/php5/core
===>  php5-core-5.2.5p3 depends on: libxml-* - not found
===>  Verifying install for libxml-* in textproc/libxml
===>  Checking files for libxml2-2.6.32
`/usr/ports/distfiles/libxml2-2.6.32.tar.gz' is up to date.
>> (SHA256) libxml2-2.6.32.tar.gz: OK
===>  libxml-2.6.32 depends on: python-2.5* - not found
===>  Verifying install for python-2.5* in lang/python/2.5
===>  python-2.5.2p0 uses X11, but /usr/X11R6 not found.
===> Returning to build of libxml-2.6.32
===>  libxml-2.6.32 depends on: python-2.5* - not found
===>  Verifying install for python-2.5* in lang/python/2.5
===>  python-2.5.2p0 uses X11, but /usr/X11R6 not found.
===> Returning to build of libxml-2.6.32
Dependency check failed
*** Error code 1

Stop in /usr/ports/textproc/libxml (line 1556 of /usr/ports/infrastructure/mk/bsd.port.mk).
*** Error code 1

Stop in /usr/ports/textproc/libxml (line 1927 of /usr/ports/infrastructure/mk/bsd.port.mk).
*** Error code 1

Stop in /usr/ports/textproc/libxml (line 1398 of /usr/ports/infrastructure/mk/bsd.port.mk).
*** Error code 1

Stop in /usr/ports/textproc/libxml (line 1896 of /usr/ports/infrastructure/mk/bsd.port.mk).
*** Error code 1

Stop in /usr/ports/textproc/libxml (line 1428 of /usr/ports/infrastructure/mk/bsd.port.mk).
*** Error code 1

Stop in /usr/ports/www/php5/core (line 1556 of /usr/ports/infrastructure/mk/bsd.port.mk).
===> Exiting www/php5/core with an error
*** Error code 1

Stop in /usr/ports/www/php5 (line 124 of /usr/ports/infrastructure/mk/bsd.port.subdir.mk).
It seems to me that it's Python complains that X11 isn't installed and mess things up. It's going to be a web- & mailserver and i really don't want or need X11 on it. Anyone have any ideas?
Reply With Quote
  #2   (View Single Post)  
Old 9th May 2008
nacredata nacredata is offline
Port Guard
 
Join Date: May 2008
Posts: 12
Default

Sure, seen this a few times. OpenBSD separates out the parts of x11 install and you need to install at least xbase and maybe xetc to get many ports to compile, even if you're not running x11.

But I would recommend using the packages instead, especially if you are just starting. pkg_add will pull in the dependencies automatically.

When doing package installs on a headless/command line machine, look for packages with "no_x11" at the end of them.

From the script I was using earlier this evening to install PHP on a new 4.3 (virtual) machine:

# define OpenBSD distribution server to use
SRV=ftp://rt.fm/pub/OpenBSD/4.3/packages/i386/
pkg_add ${SRV}php5-curl-5.2.5.tgz
pkg_add ${SRV}php5-gd-5.2.5-no_x11.tgz
pkg_add ${SRV}php5-mysql-5.2.5.tgz
pkg_add ${SRV}php5-mysqli-5.2.5.tgz

ln -s /var/www/conf/modules.sample/php5.conf /var/www/conf/modules
mkdir /var/www/tmp
chown www /var/www/tmp
ln -fs /var/www/conf/php5.sample/curl.ini /var/www/conf/php5/curl.ini
ln -fs /var/www/conf/php5.sample/gd.ini /var/www/conf/php5/gd.ini
ln -fs /var/www/conf/php5.sample/mysql.ini /var/www/conf/php5/mysql.ini
ln -fs /var/www/conf/php5.sample/mysqli.ini /var/www/conf/php5/mysqli.ini
Reply With Quote
  #3   (View Single Post)  
Old 9th May 2008
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 8,020
Default

FAQ 15, and the OpenBSD community at large, strongly recommend using packages instead of building ports, unless a package is unavailable due to flavor or license.

In order to build from ports, you need the entire OS -- not only the compiler, but X, which you do not have installed.
Reply With Quote
  #4   (View Single Post)  
Old 9th May 2008
DrKrall DrKrall is offline
New User
 
Join Date: May 2008
Location: Luleå - Sweden
Posts: 9
Default

Aha, got it. Thanks.

Probably better "convert" myself and start using pkg_add instead of ports then. Obviously FreeBSD made me a bit used to ports.
Reply With Quote
  #5   (View Single Post)  
Old 9th May 2008
DrKrall DrKrall is offline
New User
 
Join Date: May 2008
Location: Luleå - Sweden
Posts: 9
Default

Another question. As i understand it was python messing things up because of dependencies of xbase43. So if would install using pkg_add, wouldn't the dependencies of xbase43 still be there? And i will be forced to install (upgrade with) xbase43 set anyway?
Reply With Quote
  #6   (View Single Post)  
Old 9th May 2008
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 8,020
Default

Many dependencies are build dependencies, rather than run dependencies. You can check by using make with print-build-depends and print-run-depends. The only run-dependency is gettext, and of course, whatever run dependencies gettext has.

WARNING WARNING WARNING:

In this particular case you were attempting to build php5-core-5.2.5p3, which is -current, not -release/-stable. That is a) not suppported, and b) causes all sorts of problems. See FAQ 15.4.1 for details.
Reply With Quote
  #7   (View Single Post)  
Old 9th May 2008
DrKrall DrKrall is offline
New User
 
Join Date: May 2008
Location: Luleå - Sweden
Posts: 9
Default

Really? I have *default tag=OPENBSD_4_3 in my supfile. What should it be?
Reply With Quote
  #8   (View Single Post)  
Old 9th May 2008
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 8,020
Default

p2 is what is tagged for -release/-stable, and what you will find in your nearest mirror's package directory.

See: http://www.openbsd.org/cgi-bin/cvswe.../core/Makefile
Reply With Quote
  #9   (View Single Post)  
Old 23rd May 2008
Dazhelpwiz Dazhelpwiz is offline
Port Guard
 
Join Date: May 2008
Location: Townsville, Australia
Posts: 34
Default

The easiest way Ive found to make apache2 and php5 work together on openbsd is the following.

================================================== ===========

if u need mysql, install that from the packages.

install p5-XML-LibXML from the packages.

for apache2 and php5 you need to compile both from the src.
download the tar.gz files from httpd.apache.org and php.net.

in the httpd-2.2.8 folder:

#./configure --prefix=/usr/local/apache2 --enable-so --enable-rewrite=shared --enable-speling=shared --with-included-apr
#make
#make install

cd into the php5 folder:

#./configure --with-apxs2=/usr/local/apache2/bin/apxs --with-zlib=/usr

(if u have mysql and wish to use it add "--with-mysql" to the php configure line)

#make
#make test
#make install
#cp php.ini-dist /usr/local/lib/php.ini

#vi /usr/local/apache2/conf/httpd.conf

and add these following line in the appropriate section.

AddType application/x-httpd-php .php

and save and quit

finally run

#/usr/local/apache2/bin/apachectl start.

There you go, working apache2.2.8 with php 5.2.6

if u need GD I can tell u how to get that working too...

Last edited by Dazhelpwiz; 26th May 2008 at 11:23 PM.
Reply With Quote
Reply

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
Problem with latest php5 from ports clevershark FreeBSD Ports and Packages 1 22nd July 2009 07:38 PM
Problem Installing From External DVD Drive jimnms OpenBSD Installation and Upgrading 8 16th July 2009 07:12 PM
Problem with installing FreeBSD 7.0 Stable likemandrake FreeBSD General 2 5th October 2008 08:16 AM
Problem with upgrading php5-pcre and php5-mysql KernelPanic FreeBSD Ports and Packages 6 16th June 2008 10:00 PM
openbsd4.3 - problem compile php5 blackyzero OpenBSD General 3 27th May 2008 06:24 PM


All times are GMT. The time now is 07:41 PM.


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