Is it possible to install ubuntu libraries?


I’m new to Replit. Just curious how to go about doing this within my Replit…

sudo apt install libgssapi-krb5-2

The lib is missing, so when I try and import PySide2 into a python replit, it fails.


Welcome to the community! using the sudo command isn’t allowed in replit. if you are trying to install a python library, use pip

1 Like

Thank you. Yes – I tried using sudo and failed. Since sudo is not permitted, I assumed there is some other method of installing that particular library. I’m posting here, looking for an alternative method.

To be clear, it’s not a python lib.

1 Like

An update to this thread.

I tried using this command to install the library, but the feedback was that it wasn’t familiar with the flag --install-as-user
nix-env -i --install-as-user libgssapi-krb5-2

So I removed --install-as-user and tried again, but after a long while, the process running in the shell was killed, and no output was displayed.

Finally I tried running this one…
nix-env --verbose -i libgssapi-krb5-2

And then I got this warning… lol. Hopefully, I didn’t break anything I wasn’t supposed to.

1 Like

@Tuckz79 I tried the same thing just to see what would happen and got that message too. As it turns out it violates Terms of Service 4.14, which says:

  1. Launch any automated system, including without limitation, “robots”, “spiders”, or “offline readers” that access the Service in a manner that sends more request messages or any other content to the Replit servers in a given period of time than a human can reasonably produce in the same period by using a conventional online web browser

Obviously it’s not a spider or robots or something else that requested Replit, it was a simple command.
So I think the command requested Replit servers so many times that the Repl was forced to stop

Hey Gavin,

Thanks for confirming that. I suspected that was the violation item I was triggering.

I’ve not used NixOS before, so I’ll have to do some learning, and digging related to getting PySide working with it.

I discovered that if you try to run a command in shell and it’s not installed it will prompt you to install the NixOS package without sudo. That works. Try it.

@Tuckz79 You can use Python’s built-in tkinter (Tool Kit for Interfaces) package if you can’t install the library for PySide.

I know lots of places recommended installing nixpkgs from the command line, but that either does not work with replit, or is not permanent and will go away quickly. To make packages permanent, add them to your replit.nix. For example pkgs.libgssapi-krb5-2.

Yeah – the problem with that is NixOS doesn’t support that lib. I’m looking for a working solution here. I’ve gone down that path, without much success – I was hoping some support from the devs of Replit could be obtained here. The help section of their website directed me to this forum.

It is possible to create your own packages and there are some topics here about that. If you must you could probably download/compile the lib yourself.

I’m not sure how to do that. You mean to download the source to the Replit? Then compile it using the machine that the Replit is running on?

Seems like a lot of work – perhaps I’m trying to do too much with Replit. I figured it could simulate the environment I need to work within relatively easily.

I am pretty sure nix compiles it for you, as long as you configure it right.

I was under the assumption that you had to use existing Nix libs and request them if they don’t exist. Again, my knowledge of Nix is terrible.

I’m pretty disappointed that nobody from Replit (official) has replied to this thread, given that I’m paying for their pro service, and their help documentation says to post here.

If you want that kind of help, open a support request to directly contact staff.