Installing st: Fatal Error

I’m very new to Linux. Currently tinkering with Nobara and wanted to install st. I was able to successfully install it last night but when I started attempting to patch it for customization purposes I think I messed something up. I had needed to remove st multiple times and re-install so I could start fresh and fix my errors. Now when I attempt to run make clean install I get a host of errors related to packages that are installed but can’t seem to be found?


<span style="color:#323232;">[astralpath@nobara-pc st]$ sudo make clean install
</span><span style="color:#323232;">[sudo] password for astralpath: 
</span><span style="color:#323232;">rm -f st st.o x.o st-0.9.tar.gz
</span><span style="color:#323232;">c99 -I/usr/X11R6/include  `pkg-config --cflags fontconfig`  `pkg-config --cflags freetype2` -DVERSION="0.9" -D_XOPEN_SOURCE=600  -O1 -c st.c
</span><span style="color:#323232;">Package fontconfig was not found in the pkg-config search path.
</span><span style="color:#323232;">Perhaps you should add the directory containing `fontconfig.pc'
</span><span style="color:#323232;">to the PKG_CONFIG_PATH environment variable
</span><span style="color:#323232;">Package 'fontconfig', required by 'virtual:world', not found
</span><span style="color:#323232;">Package freetype2 was not found in the pkg-config search path.
</span><span style="color:#323232;">Perhaps you should add the directory containing `freetype2.pc'
</span><span style="color:#323232;">to the PKG_CONFIG_PATH environment variable
</span><span style="color:#323232;">Package 'freetype2', required by 'virtual:world', not found
</span><span style="color:#323232;">c99 -I/usr/X11R6/include  `pkg-config --cflags fontconfig`  `pkg-config --cflags freetype2` -DVERSION="0.9" -D_XOPEN_SOURCE=600  -O1 -c x.c
</span><span style="color:#323232;">Package fontconfig was not found in the pkg-config search path.
</span><span style="color:#323232;">Perhaps you should add the directory containing `fontconfig.pc'
</span><span style="color:#323232;">to the PKG_CONFIG_PATH environment variable
</span><span style="color:#323232;">Package 'fontconfig', required by 'virtual:world', not found
</span><span style="color:#323232;">Package freetype2 was not found in the pkg-config search path.
</span><span style="color:#323232;">Perhaps you should add the directory containing `freetype2.pc'
</span><span style="color:#323232;">to the PKG_CONFIG_PATH environment variable
</span><span style="color:#323232;">Package 'freetype2', required by 'virtual:world', not found
</span><span style="color:#323232;">x.c:15:10: fatal error: X11/Xft/Xft.h: No such file or directory
</span><span style="color:#323232;">   15 | #include <X11/Xft/Xft.h>
</span><span style="color:#323232;">      |          ^~~~~~~~~~~~~~~
</span><span style="color:#323232;">compilation terminated.
</span><span style="color:#323232;">make: *** [Makefile:16: x.o] Error 1
</span><span style="color:#323232;">
</span>

I’m not sure why these issues are occurring now. Could someone help point me in the right direction to troubleshoot? I’m really lost on how to proceed even though the error output seems to be giving me some pretty explicit instructions.

Thanks in advance :)–

AstralPath,

Alright it seems as though I’ve got it figured out. I’m so confused though.

Re-installing fontconfig, libXft and their additional devel packages fixed the problem, but I performed this exact step last night to no avail. I have no idea what changed since then but I can finally launch st. I wish I could provide more info on my troubleshooting but it really seems to have boiled down to re-installing the packages listed in the error message.

AstralPath,

I’ve confirmed that fontconfig, freetype2 (although it’s listed as “ghc-gi-freetype2” in my package manager, not sure if that’s bad), and libXft are all installed. Seems like something may have changed with where they’re located or that make is looking for them in the wrong spot all of a sudden? As I mentioned above, I had no issues installing this previously.

Note: What may have caused an issue is that on one of my reinstall attempts last night I accidentally installed st to the root folder. I ended up removing it and re-installing back in my home folder, but is it possible that the process of removing it from Root caused this?

JATtho,

Please, never run plain “sudo make install” on a package managed system. With linux from scratch it might make sense… Doing so will “install” the thing (copy the files), but the copied files are foreign to the package manager. You cannot easily undo this, and can cause issues in future.

You had a compiler error about missing header file, libXft is from Xorg project. “devel” versions of packages usually provide these files.

st is from suckless project so it doesn’t need much to be “installed”: copy the built binaries into ~/bin/ or /opt/ and set your user PATH to look into those dirs. Check your user env if you need to modify the PATH.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • linux@sopuli.xyz
  • ngwrru68w68
  • DreamBathrooms
  • thenastyranch
  • magazineikmin
  • InstantRegret
  • GTA5RPClips
  • Youngstown
  • everett
  • slotface
  • rosin
  • osvaldo12
  • mdbf
  • kavyap
  • cubers
  • megavids
  • modclub
  • normalnudes
  • tester
  • khanakhh
  • Durango
  • ethstaker
  • tacticalgear
  • Leos
  • provamag3
  • anitta
  • cisconetworking
  • JUstTest
  • lostlight
  • All magazines