Trying to install php smbclient - pecl can't find /usr/bin/sed


 Share

2 2

Recommended Posts

Good morning community,

I need to install the php extension smbclient but the pecl command fails.

My odroid xu4 development board works under arbiam 20.11 Stable. with Apache 2.4.? (latest) / Msql 10.3.25-MariaDB / Php 7.4.13 (packages.sury.org)

 

konki@cloud:/etc/php/7.4/fpm# pecl channel-update pecl.php.net

Updating channel "pecl.php.net" Update of Channel "pecl.php.net" succeeded

konki@cloud:/etc/php/7.4/fpm# pecl install smbclient

downloading smbclient-1.0.0.tgz ...

Starting to download smbclient-1.0.0.tgz (32,017 bytes)

.........done: 32,017 bytes

4 source files, building

running: phpize

/usr/bin/phpize: 1: /usr/bin/phpize: /usr/bin/sed: not found

grep: write error: Broken pipe

/usr/bin/phpize: 1: /usr/bin/phpize: /usr/bin/sed: not found

grep: write error: Broken pipe

/usr/bin/phpize: 1: /usr/bin/phpize: /usr/bin/sed: not found

grep: write error: Broken pipe

Configuring for:

PHP Api Version:

Zend Module Api No:

Zend Extension Api No:

/usr/bin/phpize: 164: /usr/bin/phpize: /usr/bin/sed: not found

autoheader: error: AC_CONFIG_HEADERS not found in configure.ac

ERROR: `phpize' failed

konki@cloud:/etc/php/7.4/fpm#

 

Can't find a fix with google! Could you help me?

 

Thank's

Konki

Link to post
Share on other sites

Donate and support the project!

I was of the same opinion but the absence of GNU Sed from the /usr/bin directory is very strange under debian.

sed is installed under armbian 20, but the binary is in the /bin directory. it seems to me that this choice is absolutely not judicious even if a simple symlink allows to solve the problem. I have a workstation under MXLinux (debian stable) and the binary is in its usual place.
I see the same curiosity under linux raspberrypi 5.4.72, sed is installed but the /bin directory!

 

Damned, I thank you for your opinions, but you are wrong:
pecl is a simple script bash which ensures the local compilation of the package.
so either you modify the link /usr/bin/sed in pecl, or you just have to create a link for sed in its historical directory!!!

 

# sed --v
sed (GNU sed) 4.7
Packaged by Debian
Copyright (C) 2018 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

 

# type -a sed
sed is /bin/sed

 

# cd /bin
# ln -s /bin/sed /user/bin/sed (create a symlink for sed)
# cd /usr/bin
# ln -l sed

lrwxewxrwx l root ....... sed -> /bin/sed

 

/usr/bin# pecl install smbclient

.......

Build process completed successfully
Installing '/usr/lib/php/20190902/smbclient.so'
install ok: channel://pecl.php.net/smbclient-1.0.0
configuration option "php_ini" is not set to php.ini location
You should add "extension=smbclient.so" to php.ini

 

that's all folks

 

konki

Link to post
Share on other sites

1 hour ago, konki said:

it seems to me that this choice is absolutely not judicious ...

Well, it is your opinion. Mine is not better ...

 

But maybe you should complain with the script providers ...

 

As Igor said, "sed" is a mandatory component for the system and historically /usr was a user filesystem mounted only after initial system initialization. Unix (and Linux) is not WIndows : you have to get some control over the system and not reinstall in case of problem. So the system needs to be layered in some way.

Link to post
Share on other sites

2 hours ago, konki said:

I was of the same opinion but the absence of GNU Sed from the /usr/bin directory is very strange under debian.

sed is installed under armbian 20, but the binary is in the /bin directory.

 

┌─[ 2020-12-05 03:01 trs-80@host:~ ]
└─▶ $ which sed

/bin/sed

┌─[ 2020-12-05 13:01 trs-80@host:~ ]
└─▶ $ dpkg --print-architecture

amd64

┌─[ 2020-12-05 13:01 trs-80@host:~ ]
└─▶ $ lsb_release -d

Description:	Debian GNU/Linux bullseye/sid

┌─[ 2020-12-05 13:06 trs-80@host:~ ]
└─▶ $ ls -al /bin | grep sed

-rwxr-xr-x  1 root root  122224 Dec 22  2018 sed

 

Edited by TRS-80
add last part to show it's not symlink
Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

2 2