Giter VIP home page Giter VIP logo

Comments (7)

sjackman avatar sjackman commented on May 24, 2024

Can you report the result of ldd ~/.linuxbrew/bin/zsh?

from legacy-linuxbrew.

waiting-for-dev avatar waiting-for-dev commented on May 24, 2024

Here it is:

linux-vdso.so.1 =>  (0x00007fff4fde1000)
libgdbm.so.4 => not found
libpcre.so.1 => not found
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f5ba4973000)
libtinfo.so.5 => /lib/x86_64-linux-gnu/libtinfo.so.5 (0x00007f5ba474a000)
librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007f5ba4542000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f5ba42bf000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f5ba3f34000)
/lib64/ld-linux-x86-64.so.2 (0x00007f5ba4b9d000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f5ba3d18000)

from legacy-linuxbrew.

sjackman avatar sjackman commented on May 24, 2024
set |grep '^LD'
export LD_LIBRARY_PATH
set |grep '^LD'
ldd ~/.linuxbrew/bin/zsh

from legacy-linuxbrew.

waiting-for-dev avatar waiting-for-dev commented on May 24, 2024
marc@mojos:~$ set |grep '^LD'
LD_LIBRARY_PATH=/home/marc/.linuxbrew/lib:
marc@mojos:~$ export LD_LIBRARY_PATH
marc@mojos:~$ set |grep '^LD'
LD_LIBRARY_PATH=/home/marc/.linuxbrew/lib:
marc@mojos:~$ ldd ~/.linuxbrew/bin/zsh
    linux-vdso.so.1 =>  (0x00007fffe15ff000)
    libgdbm.so.4 => /home/marc/.linuxbrew/lib/libgdbm.so.4 (0x00007f5279591000)
    libpcre.so.1 => /home/marc/.linuxbrew/lib/libpcre.so.1 (0x00007f527933d000)
    libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f5279115000)
    libtinfo.so.5 => /lib/x86_64-linux-gnu/libtinfo.so.5 (0x00007f5278eec000)
    librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007f5278ce4000)
    libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f5278a61000)
    libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f52786d6000)
    libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f52784ba000)
    /lib64/ld-linux-x86-64.so.2 (0x00007f527979d000)

Thanks!! Now it works. Can you explain what happened? It was just a matter of exporting LD_LIBRARY_PATH?. In my .bashrc I had LD_LIBRARY_PATH="$HOME/.linuxbrew/lib:$LD_LIBRARY_PATH" instead of the export, but I thought it was the same.

from legacy-linuxbrew.

sjackman avatar sjackman commented on May 24, 2024

They're similar, but not exactly the same.

LD_LIBRARY_PATH="$HOME/.linuxbrew/lib:$LD_LIBRARY_PATH"

sets a local shell variable, whereas

export LD_LIBRARY_PATH="$HOME/.linuxbrew/lib:$LD_LIBRARY_PATH"

sets an environment variable. Your confusion is probably caused by your experience with PATH, which is already exported, so you don't need to export it again when you modify it, whereas LD_LIBRARY_PATH was not yet exported.

Cheers,
Shaun

from legacy-linuxbrew.

waiting-for-dev avatar waiting-for-dev commented on May 24, 2024

Yeah, I was used to the PATH experience. Thanks a lot :)

from legacy-linuxbrew.

waiting-for-dev avatar waiting-for-dev commented on May 24, 2024

Just in case someone is interested. Previous solved the issue when it is the case that you launch zsh from bash or another running shell, but the error persists when zsh is configured to be the default shell. It is that way because zsh can't be launched as the first shell because it doesn't find its shared libraries because it hasn't yet have time to read .zshrc.

I'm not sure in others distributions, but in debian systems you must add as sudo a file in /etc/ld.so.conf.d/ called for example linuxbrew.conf. For this file it is enough to have a line with the path to the lib directory of your linubrew installation, for example:

/home/user/.linuxbrew/lib

That way, linuxbrew lib directory will be available on startup and the default shell will know about it.

If you want to update the settings before restart, run sudo ldconfig.

I don't know if it would be good to add it to the README, because it is needed for a complete installation of linuxbrew.

from legacy-linuxbrew.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.