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

php7.2-sodium: module "sodium" already loaded #747

Closed
luispabon opened this issue Nov 22, 2017 · 9 comments
Closed

php7.2-sodium: module "sodium" already loaded #747

luispabon opened this issue Nov 22, 2017 · 9 comments

Comments

@luispabon
Copy link

Looks like sodium is already compiled into PHP core:

root@a34b2c6dffe0:~# apt install php7.2-cli -y --no-install-recommends
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following additional packages will be installed:
  libargon2-0 libbsd0 libedit2 libicu55 libmagic1 libsodium18 libxml2 mime-support php-common php7.2-common php7.2-json php7.2-opcache php7.2-readline ucf
Suggested packages:
  file php-pear
Recommended packages:
  xml-core file
The following NEW packages will be installed:
  libargon2-0 libbsd0 libedit2 libicu55 libmagic1 libsodium18 libxml2 mime-support php-common php7.2-cli php7.2-common php7.2-json php7.2-opcache php7.2-readline ucf
0 upgraded, 15 newly installed, 0 to remove and 2 not upgraded.
Need to get 13.4 MB of archives.
After this operation, 52.4 MB of additional disk space will be used.
Get:1 http://ppa.launchpad.net/ondrej/php/ubuntu xenial/main amd64 libxml2 amd64 2.9.4-1+deb.sury.org~xenial+2 [917 kB]
Get:2 http://archive.ubuntu.com/ubuntu xenial/main amd64 libbsd0 amd64 0.8.2-1 [41.7 kB]
[...]
root@a34b2c6dffe0:~# php -i|grep sodium
sodium
sodium support => enabled
libsodium headers version => 1.0.14
libsodium library version => 1.0.14

But then, php7.2-sodium is also available, and when installed it tries to load twice, hence the warning. I'd suggest to get rid of that package entirely.

@cjunge
Copy link

cjunge commented Nov 27, 2017

Not sure if it's related, but I'm getting

$ php -v
php: symbol lookup error: php: undefined symbol: sodium_pad

after installing PHP7.2 from the PPA. Whether php7.2-libsodium is installed it doesn't seem to matter for me.

@oerdnj
Copy link
Owner

oerdnj commented Dec 1, 2017

What's output of:
apt-cache policy php7.2
and
apt-cache policy php7.2-sodium
and
apt-cache policy php-sodium
?

@luispabon
Copy link
Author

Just deleting these as I've realised 7.2 is out. Going to update the base container and report back.

@oerdnj
Copy link
Owner

oerdnj commented Dec 1, 2017

@cjunge Purge your /usr/local and no, it's not related.

@luispabon
Copy link
Author

Apologies for the delay:

root@43577cdce1e2:/# apt-cache policy php7.2
php7.2:
  Installed: (none)
  Candidate: 7.2.0-1+ubuntu16.04.1+deb.sury.org+1
  Version table:
     7.2.0-1+ubuntu16.04.1+deb.sury.org+1 500
        500 http://ppa.launchpad.net/ondrej/php/ubuntu xenial/main amd64 Packages
root@43577cdce1e2:/# apt-cache policy php7.2-sodium
php7.2-sodium:
  Installed: 7.2.0-1+ubuntu16.04.1+deb.sury.org+1
  Candidate: 7.2.0-1+ubuntu16.04.1+deb.sury.org+1
  Version table:
 *** 7.2.0-1+ubuntu16.04.1+deb.sury.org+1 500
        500 http://ppa.launchpad.net/ondrej/php/ubuntu xenial/main amd64 Packages
        100 /var/lib/dpkg/status
root@43577cdce1e2:/#  apt-cache policy php-sodium
php-sodium:
  Installed: (none)
  Candidate: 2.0.4-2+ubuntu16.04.1+deb.sury.org+1
  Version table:
     2.0.4-2+ubuntu16.04.1+deb.sury.org+1 500
        500 http://ppa.launchpad.net/ondrej/php/ubuntu xenial/main amd64 Packages
root@43577cdce1e2:/# 

@luispabon
Copy link
Author

You can try this yourself on this docker image: phpdockerio/php72-cli:dodgy-sodium

Example:
docker run -it --rm phpdockerio/php72-cli:dodgy-sodium php --version

@davidfavor
Copy link

It does appear Sodium is compiled in, so fix seems to be just avoid...

apt-get install php7.2-sodium

Likely this does require fixing. Either removing Sodium from core or retiring the php7.2-sodium package.

@oerdnj
Copy link
Owner

oerdnj commented Dec 6, 2017

Ah, I see. I have removed php7.2-sodium package as it is not needed anymore. It was just an leftover.

@oerdnj oerdnj closed this as completed Dec 6, 2017
@luispabon
Copy link
Author

Great stuff, thank you 👍

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

No branches or pull requests

4 participants