akinomyoga / ble.sh

Bash Line Editor―a line editor written in pure Bash with syntax highlighting, auto suggestions, vim modes, etc. for Bash interactive sessions.
BSD 3-Clause "New" or "Revised" License
2.67k stars 85 forks source link

[cygwin, apt-cyg] Please Help installing it (make does not work) #273

Closed danil0man closed 1 year ago

danil0man commented 1 year ago

ble version: Is not installing Bash version: 4.4.12(3)-release (x86_64-unknown-cygwin)

Hello. I am trying my best to install this but is not working. I get an error that the file does not exist bash: /home/xxcastid/.local/share/blesh/ble.sh: No such file or directory bash: /home/xxcastid/.local/share/blesh/ble.sh: No such file or directory

I have tried multiple ways to install it. I can clone the folder but is like the make does not make the file. Please help. I would love to have this feature, but since I am quite new I dont understand what I am missing for it to work. I would appreciate it alot

akinomyoga commented 1 year ago

Thank you for trying ble.sh!

$ cygpath --version
$ cygcheck -c make
$ type make
$ make --version
danil0man commented 1 year ago

Q1: image Q2: Using this method image image

And when adding the code directly to .bashrc doing 1.3 I get two error messages instead of one

Thx you for responding so fast. I was at launch and when come back you already had written :D

akinomyoga commented 1 year ago

image

Hmm, This is so strange. Although make seems to be installed, it doesn't seem to function as expected. If make is working the following information should be output.

$ make --version
GNU Make 4.4
Built for x86_64-pc-cygwin
Copyright (C) 1988-2022 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

I'd like to check further information.

$ make --version
$ echo "$?"
$ ls -l /usr/bin/make
$ sha256sum /usr/bin/make
danil0man commented 1 year ago

Q3 image Q4 I dont get any output

danil0man commented 1 year ago

I am super confuse. specially since I am new to all this bash CLI

akinomyoga commented 1 year ago
  • Q3: What is the value of $? after running make --version? I.e., the result of the following command:
$ make --version
$ echo "$?"

Could you try this? You need to run echo "$?" immediately after running make --version.

danil0man commented 1 year ago

Q3 Sorry I missed this image Here it is

akinomyoga commented 1 year ago

Thanks. Hmm, I've never met this situation. The situation is unusual. Don't worry, it's not just because you are new to the Bash CLI.

$ cygrunsrv -L
$ ps uax
$ mount
$ df
$ /usr/bin/make --version
$ /usr/make --version
danil0man commented 1 year ago

Q5: image

Here are the commands and thx you for keeping up with the noob :D. Do you reckon it maybe have to do that I am running cygwin on windows and not in a linux dist?

akinomyoga commented 1 year ago

Oh, there was a typo in the last command.

$ /bin/make --version

Do you reckon it maybe have to do that I am running cygwin on windows and not in a linux dist?

I recognize that you are in the Cygwin system, thanks to the Bash version information in your first report. All the commands "cyg-something" that I asked you to run are Cygwin-related commands.

danil0man commented 1 year ago

Q6. image Make dont seem to exist, I only get empty when i ask for the version of make

danil0man commented 1 year ago

but when I try to install it I get it already exist image

akinomyoga commented 1 year ago

Do you reckon it maybe have to do that I am running cygwin on windows and not in a linux dist?

So, yes, I'm suspecting that it is related to some issue in the Cygwin system. The directory /usr/bin is not a physical Windows directory, but something virtually "mounted" by the Cygwin system. You will notice it if you look inside C:\cygwin64\usr within Explorer (the Windows default file manager).

Hmm, but /bin/make --version also fails, which means that the Cygwin mount is unrelated.


Make dont seem to exist, I only get empty when i ask for the version of make

Yeah, I actually first suspected in Q3 that, but it does seem to exist in https://github.com/akinomyoga/ble.sh/issues/273#issuecomment-1422594725.


In my experience, it is rare, but the Cygwin runtime information is sometimes broken internally. In that case, the problem would be fixed after I reboot the system. Could you try rebooting your computer?

danil0man commented 1 year ago

Yes, I can reboot my pc

akinomyoga commented 1 year ago

Thanks.

danil0man commented 1 year ago

Should I run the same commands from Q6?

akinomyoga commented 1 year ago

Yes, Q6 /bin/make --version is sufficient to check!

danil0man commented 1 year ago

image nope. it did not do it with the reboot

akinomyoga commented 1 year ago

OK, so, do you useapt-cyg to install packages in Cygwin? I've never tried apt-cyg, but the next thing I suspect is that the dependency resolution of packages might have failed.

$ cygcheck make
danil0man commented 1 year ago

Q7 image

danil0man commented 1 year ago

I tought that was the only way to install packages except pip3

akinomyoga commented 1 year ago

The standard way to install the Cygwin packages is actually to use the GUI of setup-x86_64.exe downloaded from the Cygwin official webpage. The apt-cyg command is a non-official third party.

So, now we find at least one problem here:

image

For reference, the result of cygcheck make in my system is this, where cygguile-3.0-1.dll is found:

Found: C:\cygwin64\bin\make.exe
Found: C:\cygwin64\bin\make.exe
C:\cygwin64\bin\make.exe
  C:\cygwin64\bin\cygwin1.dll
    C:\WINDOWS\system32\KERNEL32.dll
      C:\WINDOWS\system32\ntdll.dll
      C:\WINDOWS\system32\KERNELBASE.dll
  C:\cygwin64\bin\cygguile-3.0-1.dll
    C:\cygwin64\bin\cygcrypt-2.dll
    C:\cygwin64\bin\cygffi-6.dll
    C:\cygwin64\bin\cyggc-1.dll
      C:\cygwin64\bin\cyggcc_s-seh-1.dll
    C:\cygwin64\bin\cyggmp-10.dll
    C:\cygwin64\bin\cygiconv-2.dll
    C:\cygwin64\bin\cygintl-8.dll
    C:\cygwin64\bin\cygunistring-2.dll

This means that in your system, the necessary dependency is not correctly resolved by the installer. Could you try reinstalling the make package by the following command? (edit: though I'm not sure if this is the right command to reinstall a package by apt-cyg).

$ apt-cyg install --reinstall make
danil0man commented 1 year ago

that must be it then :(, do you know any workaround? image Once I installed cygwin I dont know how to add new packages without using apt-cyg

danil0man commented 1 year ago

can I install make using chocolatey?

akinomyoga commented 1 year ago

Hmm, so reinstalling doesn't fix the problem, which means that apt-cyg is somehow broken. I also find some issue report at https://github.com/transcode-open/apt-cyg/issues/110 about the dependency issue caused by apt-cyg, though it doesn't seem to happen frequently because this seems to be the only report.

Once I installed cygwin I dont know how to add new packages without using apt-cyg

I guess this is the time you learn how to update existing packages and install new packages in an official way. Now I'm writing a description for you, wait a minute...

I've never used chocolatey, but I doubt the third-party controller could properly handle the Cygwin packages for every case. I'd guess it would work in the most cases, but rarely it could break the system. There is a reason that the official Cygwin provides a limited way of updating it.

danil0man commented 1 year ago

I see, well, that sucked. I did not know, but you learn something new everyday. I perhaps then should reinstall cygwin. It seems if you reinstall and there is a file it understand is a modifcation instead of a full reboot. I will try

akinomyoga commented 1 year ago

Actually, the Cygwin installer is used also to update and install new packages. It is all explained in the following page on the official site:

Briefly,

image

danil0man commented 1 year ago

It worked now. I try to reinstall ble.sh when i get home. I let you know how does it goes and thx you so much for helping me out! image

akinomyoga commented 1 year ago

Ah, OK. Great!

danil0man commented 1 year ago

Now it seems to be working image thx you so much I would not had know about apt-cyg and that i just need to reinstall to add new packages

akinomyoga commented 1 year ago

Nice!

One thing to note:

It seems you have tried installing ble.sh multiple times, so you seem to have multiple lines "source ~/.local/share/blesh/ble.sh" in your ~/.bashrc. A single line is sufficient there, so please open ~/.bashrc in a text editor and remove duplicate lines of source ~/.local/share/blesh/ble.sh.

danil0man commented 1 year ago

Yeah I manage to find were the lines were. Thx you. This is all new for me but amazing nonetheless. I cannot even phantom how you can make a whole program 😅

Skickat från Outlook för Androidhttps://aka.ms/AAb9ysg


From: Koichi Murase @.> Sent: Wednesday, February 8, 2023 4:17:22 PM To: akinomyoga/ble.sh @.> Cc: Danny Castillo Cabrera @.>; Author @.> Subject: Re: [akinomyoga/ble.sh] Please Help installing it (Issue #273)

Nice! One thing to note: It seems you have tried installing ble.sh multiple times, so you seem to have multiple lines of source ~/.local/share/blesh/ble.sh in your ~/.bashrc. A single line is sufficient, so please open ~/.bashrc in a text editor and remove duplicate lines of source ~/.local/share/blesh/ble.sh.

— Reply to this email directly, view it on GitHubhttps://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fakinomyoga%2Fble.sh%2Fissues%2F273%23issuecomment-1422759341&data=05%7C01%7C%7C0f6f51eba17d405743bf08db09e793cf%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C638114662442640633%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=feNUkVkIrJGaUGd4OYwD3Zz0t%2B3vJD%2BaDAlW%2B4R8Zdo%3D&reserved=0, or unsubscribehttps://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FARFW3B7AMJ2OFPCIWS67J4DWWO2IFANCNFSM6AAAAAAUVBCA54&data=05%7C01%7C%7C0f6f51eba17d405743bf08db09e793cf%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C638114662442796933%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=kB4daV74t4GrI4bpiTnAX1%2F2ZbkkO%2Ft1qt5S50a3NUg%3D&reserved=0. You are receiving this because you authored the thread.Message ID: @.***>

danil0man commented 1 year ago

Hey Aki. Is working now

image

thx for helping me out. I learned alot

akinomyoga commented 1 year ago

OK! Thank you! Let me close the issue. If there is still an installation issue, please reopen it!