If a non-root user tries to install MPICH, an error is reported when /usr/bin/ld: cannot find

QQ39974867 注册会员
2023-01-12 03:26

Add the paths to each of the three libraries you can't find to /root/.bashrc,source once, and /etc/ld.so.conf once. Then the ldconfig should be found at once.

dingdh13 注册会员
2023-01-12 03:26

If there is no other way, try this: libpsm_infinipath, libnl-3, libnl-route-3
Download the three libraries to a local user in the make install directory to the local user, Then try
with the -L directory containing the local user./configure --prefix=/home/xxx/yyy to set the installation address.
or static, compile locally each time.

libinyaogoupiao 注册会员
2023-01-12 03:26

You can try to specify the location of the library during configure, for example:

./configure LDFLAGS="-L/usr/lib64"


./configure LDFLAGS="-L/usr/lib64/psm2-compat"

Of course, this is just a practice, and if that doesn't work, you might want to check to see if any other library files are missing, or if the library files have sufficient access.
Gives a solution:

When compiling the configure file for MPICH, use the following command:

./configure LDFLAGS="-L/usr/lib64 -L/usr/lib"

This will allow you to add /usr/lib64 and /usr/lib to the search path at compile time, thus resolving the problem of /usr/bin/ld not being able to find the desired library files.

Note: by /usr/lib64 and /usr/lib, we mean where the libraries you need are located. If your library files are located in a different location, change the path to the location you want.

should compile properly when you run the make command.

Hope this method helps you. Hope to adopt.

yuki1201 注册会员
2023-01-12 03:26

If you want to install MPICH with a non-root user, you can specify the --prefix parameter during installation, for example:

./configure --prefix=$HOME/mpich-install

This way, MPICH will be installed in the $HOME/mpich-install directory. You can then add the $HOME/mpich-install/lib directory to the LD_LIBRARY_PATH environment variable and run the make command.

In addition, you can try changing the owner of the file so that you can read and write to the file yourself by using the following command:

chown -R $USER:$USER $HOME/mpich-install

Hope these suggestions help you solve the problem.

a15545520040 注册会员
2023-01-12 03:26

When you install MPICH as a non-root user, you may get the /usr/bin/ld: cannot find error. This may be due to the lack of some dependent libraries or compilation tools.

To solve this problem, you can try installing the following packages:

build-essential: This is a set of software packages that includes the GCC compiler and other compilation tools.
libcr0: This is a C library that contains some commonly used functions.
libcr-dev: This is the development version of libcr0 and includes the header and library files. You can install these packages using the following command:

sudo apt-get install build-essential libcr0 libcr-dev

Once the installation is complete, run the "make" command again to see if the problem is resolved.

denny523 注册会员
2023-01-12 03:26
< div class = "md_content_show e397 data - v - 3967" = "" >

I have installed the latest GCC

czyroy 注册会员
2023-01-12 03:26

See this example [make error :"/usr/bin/ld: cannot find -lXXX"], link: https://blog.csdn.net/adrian169/article/details/9093631

dtc6493829 注册会员
2023-01-12 03:26

You can try to specify the location of the library file when compiling MPICH.

You can specify the location of the library files when running the configure script, using the following command:

./configure LDFLAGS="-L/usr/lib64 -Wl,-rpath=/usr/lib64"

Note that you need to replace the above path with the actual location of the library file on your system.

You can then run the make command to compile MPICH.
For reference only, hope to adopt, thank you.

zcc493841274 注册会员
2023-01-12 03:26

What's the actual location? It's /usr/lib64. Then I found that this method does not work, the same error occurs, strange.

crnetqqhrgx 注册会员
2023-01-12 03:26

These error messages are caused by missing library files.

"cannot find -lpsm_infinipath" prompts missing libpsm_infinipath.so library file.
"cannot find -lnl-3" and "cannot find -lnl-route-3" indicate that libnl-3.so and libnl-route-3.so library files are missing.

You need to install these library files on your system to resolve these errors.

If you are using Ubuntu, you can install these libraries using the following command:

```sudo apt-get install libpsm-infinipath1 libnl-3-200 libnl-route-3-200

About the Author

Question Info

Publish Time
2023-01-12 03:25
Update Time
2023-01-12 03:25