How to Fix CMake Build Error for Fastfetch: Output File is a Directory?

0
7
Asked By CuriousCat42 On

I'm encountering an error when trying to build Fastfetch using CMake. The error message states: '/usr/bin/ld: cannot open output file /home/hellos/build/fastfetch: Is a directory'. I ran the command 'gmake' and it fails at the end with multiple error messages. I initially thought it was due to having a directory named 'fastfetch' in my working directory, but I don't see one. Can anyone help me figure out how to resolve this? I did a git clone to get the files, and everything went fine with CMake. After some digging, I realized that I mistakenly created the build directory before cloning the repository.

2 Answers

Answered By TechieTurtle On

It sounds like you might have created a 'fastfetch' directory in your build path accidentally. To fix this, you could try deleting the existing 'build' directory and creating it again after you've cloned the Fastfetch repo. Here's a quick terminal command that should do the trick:

```bash
git clone https://github.com/fastfetch-cli/fastfetch &&
mkdir -p fastfetch/build &&
cd fastfetch/build &&
cmske .. &&
make -j$(nproc) &&
./fastfetch
```
This should compile it successfully without the directory error.

FastFetchFan -

Thanks for your help! I ran those commands and it worked perfectly. Now I just need to figure out how to access fastfetch globally.

Answered By QuietCoder On

If you want to use the Fastfetch command from anywhere, you should run `make install` after you compile it. Just remember to clean up afterwards.

CuriousCat42 -

Got it, I’ll do that! Thanks for the tip!

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.