Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PHP: PROTOBUF NOT LOADING #4023

Closed
pjebs opened this issue Dec 10, 2017 · 18 comments
Closed

PHP: PROTOBUF NOT LOADING #4023

pjebs opened this issue Dec 10, 2017 · 18 comments
Assignees
Labels

Comments

@pjebs
Copy link

pjebs commented Dec 10, 2017

On Linux Alpine, protobuf does not install. grpc does however.

Specifically (DOCKER):

[redacted]
FROM php:7.2-fpm-alpine3.6

# Install grpc library
RUN pecl install grpc \
	&& pecl install protobuf \
    && docker-php-ext-enable grpc protobuf
@TeBoring
Copy link
Contributor

TeBoring commented Dec 11, 2017 via email

@pjebs
Copy link
Author

pjebs commented Dec 11, 2017

No

@TeBoring
Copy link
Contributor

Could you paste your error message?

@TeBoring
Copy link
Contributor

I have successfully build the docker with:

FROM php:7.2-fpm-alpine3.6

# Install grpc library
RUN apk add --update alpine-sdk
RUN apk add --no-cache \
                $PHPIZE_DEPS \
                openssl-dev
RUN pecl install grpc \
        pecl install protobuf \
    && docker-php-ext-enable grpc protobuf

@TeBoring
Copy link
Contributor

It seems you need to install essential build tools first.

@pjebs
Copy link
Author

pjebs commented Dec 12, 2017

Thanks very much. I'll try your suggestion it soon.
What does $PHPIZE_DEPS refer to?

@TeBoring
Copy link
Contributor

I don't know either. I was referring to: docker-library/php#412

@pjebs
Copy link
Author

pjebs commented Dec 12, 2017

They are referring to pecl not working. For me it works perfectly for grpc and mongodb extension. Just not protobuf

@TeBoring
Copy link
Contributor

TeBoring commented Dec 12, 2017 via email

@pjebs
Copy link
Author

pjebs commented Dec 12, 2017

Still doesn't work.

PHP Warning:  PHP Startup: Unable to load dynamic library 'protobuf.so' (tried: /usr/local/lib/php/extensions/no-debug-non-zts-20170718/protobuf.so (Error relocating /usr/local/lib/php/extensions/no-debug-non-zts-20170718/protobuf.so: timelib_update_ts: symbol not found), /usr/local/lib/php/extensions/no-debug-non-zts-20170718/protobuf.so.so (Error loading shared library /usr/local/lib/php/extensions/no-debug-non-zts-20170718/protobuf.so.so: No such file or directory)) in Unknown on line 0

@juanenriqueescobar
Copy link

#3929

@TeBoring
Copy link
Contributor

@pjebs, in the php you installed, does it have the date extension?

@pjebs
Copy link
Author

pjebs commented Dec 12, 2017

date extension is installed

@TeBoring
Copy link
Contributor

Fixed in #4034

@pjebs
Copy link
Author

pjebs commented Dec 16, 2017

still doesn't work. exact same error

@TeBoring
Copy link
Contributor

That fix was not released. Please try 3.5.1: https://pecl.php.net/package/protobuf/3.5.1

@TeBoring TeBoring reopened this Dec 21, 2017
@TeBoring
Copy link
Contributor

Feel free to reopen if there is still problem.

@pjebs
Copy link
Author

pjebs commented Dec 27, 2017

Seems to work now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants