I tried to use nasm
in a bash
project on Replit (educator) but it failed as nasm
was not installed.
However, there are some assembly projects on Replit. So I forked a project, added my code, and boom it worked.
How nasm
got installed in that project? Dunno, cause it’s nowhere explained.
Now, I’d like to use external functions like printf
in the assembly code. The code being x86-32
, I need to install something similar to glibc-devel.i686
and glibc-devel
(this on Fedora). Seems to be gcc-multilib
in Ubuntu.
My question is : how do we install Linux packages in a bash
project on Replit? Thanks for the help.
2
Answers
To install a Linux package in a
bash
project on Replit, run the command directly from the console or shell. If the command is found on Nix, you'll get an invite to run it from Nix and the package will be added to the config filereplit.nix
in your poject.However, if the command you're trying to run is in a script, pressing the "Run" button or launching the script from the shell will only give an error "
Command not found
".You can also add the package to your project by directly editing
replit.nix
.You can check if your package exists in Nix using the NixOS Search - Packages page.
In bash type: