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.
Install MPICH for a non-root user and make the following error.
GEN lib/libmpi.la
/usr/bin/ld: cannot find -lpsm_infinipath
/usr/bin/ld: cannot find -lnl-3
/usr/bin/ld: cannot find -lnl-route-3
collect2: error: ld returned 1 exit status
make[2]: *** [Makefile:11152: lib/libmpi.la] Error 1
make[2]: Leaving directory '/lustre/syliu/mpich-4.0.3'
make[1]: *** [Makefile:30211: all-recursive] Error 1
make[1]: Leaving directory '/lustre/syliu/mpich-4.0.3'
make: *** [Makefile: 7291:all] Error 2
I locate the three and find /usr/lib64. I copy these to a lib I built and then add the findings to the environment variables. I don't know what to do. I'm not root, and I hope you can give me your opinion.
[syliu@ln1 mpich-4.0.3]$ locate libpsm_infinipath
/usr/lib/debug/usr/lib64/psm2-compat/libpsm_infinipath.so.1.debug
/usr/lib64/libpsm_infinipath.so.1
/usr/lib64/libpsm_infinipath.so.1.16
/usr/lib64/psm2-compat/libpsm_infinipath.so.1
[syliu@ln1 mpich-4.0.3]$ locate libnl-3
/usr/lib64/libnl-3.so.200
/usr/lib64/libnl-3.so.200.23.0
[syliu@ln1 mpich-4.0.3]$ locate libnl-route-3
/usr/lib64/libnl-route-3.so.200
/usr/lib64/libnl-route-3.so.200.23.0
0 Answer
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.
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.
You can try to specify the location of the library during configure, for example:
./configure LDFLAGS="-L/usr/lib64"
or
./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.
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.
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.
I have installed the latest GCC
See this example [make error :"/usr/bin/ld: cannot find -lXXX"], link: https://blog.csdn.net/adrian169/article/details/9093631
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.
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
这家伙很懒,什么都没留下...