镜像自地址
https://github.com/JGZYES/ParlzPackageManger.git
已同步 2026-09-11 05:42:44 +08:00
feat: auto-add ~/.pmm/root/lib to LD_LIBRARY_PATH on install
pmm now writes 'export LD_LIBRARY_PATH=$HOME/.pmm/root/lib:...:$LD_LIBRARY_PATH' to ~/.bashrc (like it already does for PATH), so a shared library installed by pmm (via a .pdm's lib/ dir) is found at runtime without manually exporting it. Takes effect in new shells (or after 'source ~/.bashrc').
这个提交包含在:
@@ -435,6 +435,14 @@ void pmm_add_to_path(void) {
|
|||||||
if (f) {
|
if (f) {
|
||||||
fprintf(f, "\n# PMM PATH\n");
|
fprintf(f, "\n# PMM PATH\n");
|
||||||
for (int i = 0; i < n; i++) if (list[i][0]) fprintf(f, "export PATH=\"%s:$PATH\"\n", list[i]);
|
for (int i = 0; i < n; i++) if (list[i][0]) fprintf(f, "export PATH=\"%s:$PATH\"\n", list[i]);
|
||||||
|
/* Shared libraries installed by PMM live under <home>/root/lib;
|
||||||
|
* make them findable by dynamically-linked tools automatically. */
|
||||||
|
fprintf(f, "\n# PMM shared library path\n");
|
||||||
|
if (pmm_flat_mode())
|
||||||
|
fprintf(f, "export LD_LIBRARY_PATH=\"%s/lib:%LD_LIBRARY_PATH\"\n", home);
|
||||||
|
else
|
||||||
|
fprintf(f, "export LD_LIBRARY_PATH=\"%s/root/lib:%s/root/lib/x86_64-linux-gnu:$LD_LIBRARY_PATH\"\n",
|
||||||
|
home, home);
|
||||||
fclose(f);
|
fclose(f);
|
||||||
}
|
}
|
||||||
(void)she;
|
(void)she;
|
||||||
|
|||||||
在新工单中引用
屏蔽一个用户